summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoridanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 15:27:30 +0000
committeridanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 15:27:30 +0000
commit517c97bdd8233d0fe370d3a8a64e92dded86a829 (patch)
tree7b9722db4946ab7d6f6b85e7586af3bcff6175da /views
parent36bb3380587de0cba8292b980771d5f9e56495e3 (diff)
downloadchromium_src-517c97bdd8233d0fe370d3a8a64e92dded86a829.zip
chromium_src-517c97bdd8233d0fe370d3a8a64e92dded86a829.tar.gz
chromium_src-517c97bdd8233d0fe370d3a8a64e92dded86a829.tar.bz2
Fix the Back and Forwards button broken in 23101
Issue 165318 was accepted but caused the back and forwards button to become unresponsive to middle-clicks. This should fix the issue but if there is a problem, we should revert 23101 because it causes a major regression while only providing a cosmetic enhancement. BUG=20323 TEST=none Review URL: http://codereview.chromium.org/199007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/button/button_dropdown.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/button/button_dropdown.cc b/views/controls/button/button_dropdown.cc
index db40cee..490eccf 100644
--- a/views/controls/button/button_dropdown.cc
+++ b/views/controls/button/button_dropdown.cc
@@ -40,7 +40,7 @@ ButtonDropDown::~ButtonDropDown() {
////////////////////////////////////////////////////////////////////////////////
bool ButtonDropDown::OnMousePressed(const MouseEvent& e) {
- if (IsEnabled() && e.IsLeftMouseButton() && HitTest(e.location())) {
+ if (IsEnabled() && IsTriggerableEvent(e) && HitTest(e.location())) {
// Store the y pos of the mouse coordinates so we can use them later to
// determine if the user dragged the mouse down (which should pop up the
// drag down menu immediately, instead of waiting for the timer)
@@ -56,15 +56,15 @@ bool ButtonDropDown::OnMousePressed(const MouseEvent& e) {
}
void ButtonDropDown::OnMouseReleased(const MouseEvent& e, bool canceled) {
- if (e.IsLeftMouseButton() || (e.IsRightMouseButton() &&
- !HitTest(e.location()))) {
+ if (IsTriggerableEvent(e) ||
+ (e.IsRightMouseButton() && !HitTest(e.location()))) {
ImageButton::OnMouseReleased(e, canceled);
}
if (canceled)
return;
- if (e.IsLeftMouseButton())
+ if (IsTriggerableEvent(e))
show_menu_factory_.RevokeAll();
if (IsEnabled() && e.IsRightMouseButton() && HitTest(e.location())) {