| Index: ui/views/controls/button/menu_button.cc
|
| diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
|
| index 83af3c9f2e632ed36142ec51513c4b3d89284620..bbbd829025c793b97c7bd53d594e65979cbd51be 100644
|
| --- a/ui/views/controls/button/menu_button.cc
|
| +++ b/ui/views/controls/button/menu_button.cc
|
| @@ -166,8 +166,9 @@ bool MenuButton::OnMousePressed(const ui::MouseEvent& event) {
|
| // If we're draggable (GetDragOperations returns a non-zero value), then
|
| // don't pop on press, instead wait for release.
|
| if (event.IsOnlyLeftMouseButton() &&
|
| - HitTestPoint(event.location()) &&
|
| - GetDragOperations(event.location()) == ui::DragDropTypes::DRAG_NONE) {
|
| + HitTestPoint(gfx::ToFlooredPoint(event.location())) &&
|
| + GetDragOperations(gfx::ToFlooredPoint(event.location())) ==
|
| + ui::DragDropTypes::DRAG_NONE) {
|
| TimeDelta delta = TimeTicks::Now() - menu_closed_time_;
|
| if (delta.InMilliseconds() > kMinimumMsBetweenButtonClicks)
|
| return Activate();
|
| @@ -181,9 +182,10 @@ void MenuButton::OnMouseReleased(const ui::MouseEvent& event) {
|
| // !IsTriggerableEvent it could lead to a situation where we end up showing
|
| // the menu and context menu (this would happen if the right button is not
|
| // triggerable and there's a context menu).
|
| - if (GetDragOperations(event.location()) != ui::DragDropTypes::DRAG_NONE &&
|
| + if (GetDragOperations(gfx::ToFlooredPoint(event.location())) !=
|
| + ui::DragDropTypes::DRAG_NONE &&
|
| state() != STATE_DISABLED && !InDrag() && event.IsOnlyLeftMouseButton() &&
|
| - HitTestPoint(event.location())) {
|
| + HitTestPoint(gfx::ToFlooredPoint(event.location()))) {
|
| Activate();
|
| } else {
|
| TextButton::OnMouseReleased(event);
|
|
|