Index: ui/views/controls/button/button_dropdown.cc |
diff --git a/ui/views/controls/button/button_dropdown.cc b/ui/views/controls/button/button_dropdown.cc |
index 5ee98b3b83444846d0bbea8a58d2cd2fb965cffb..92a42c1ab6b21bef86fa7eedfd66382806254e9d 100644 |
--- a/ui/views/controls/button/button_dropdown.cc |
+++ b/ui/views/controls/button/button_dropdown.cc |
@@ -58,8 +58,10 @@ bool ButtonDropDown::IsMenuShowing() const { |
//////////////////////////////////////////////////////////////////////////////// |
bool ButtonDropDown::OnMousePressed(const MouseEvent& event) { |
- if (enabled() && ShouldShowMenu() && |
- IsTriggerableEvent(event) && HitTest(event.location())) { |
+ if (enabled() && |
+ ShouldShowMenu() && |
+ IsTriggerableEvent(event) && |
+ HitTest(gfx::Rect(event.location(), gfx::Size(0,0)))) { |
// 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) |
@@ -93,14 +95,17 @@ bool ButtonDropDown::OnMouseDragged(const MouseEvent& event) { |
void ButtonDropDown::OnMouseReleased(const MouseEvent& event) { |
if (IsTriggerableEvent(event) || |
- (event.IsRightMouseButton() && !HitTest(event.location()))) { |
+ (event.IsRightMouseButton() && |
+ !HitTest(gfx::Rect(event.location(), gfx::Size(0, 0))))) { |
ImageButton::OnMouseReleased(event); |
} |
if (IsTriggerableEvent(event)) |
show_menu_factory_.InvalidateWeakPtrs(); |
- if (enabled() && event.IsRightMouseButton() && HitTest(event.location())) { |
+ if (enabled() && |
+ event.IsRightMouseButton() && |
+ HitTest(gfx::Rect(event.location(), gfx::Size(0, 0)))) { |
show_menu_factory_.InvalidateWeakPtrs(); |
ShowDropDownMenu(); |
} |