| Index: chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
|
| diff --git a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
|
| index 28820d8b08488a66043b94b92e5012c68c8758b7..6a79ef4de742ecb819d4b731f86768e3a23c25bd 100644
|
| --- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
|
| +++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
|
| @@ -125,8 +125,8 @@ void AutofillPopupBaseView::OnMouseCaptureLost() {
|
| }
|
|
|
| bool AutofillPopupBaseView::OnMouseDragged(const ui::MouseEvent& event) {
|
| - if (HitTestPoint(event.location())) {
|
| - SetSelection(event.location());
|
| + if (HitTestPoint(gfx::ToFlooredPoint(event.location()))) {
|
| + SetSelection(gfx::ToFlooredPoint(event.location()));
|
|
|
| // We must return true in order to get future OnMouseDragged and
|
| // OnMouseReleased events.
|
| @@ -149,8 +149,8 @@ void AutofillPopupBaseView::OnMouseExited(const ui::MouseEvent& event) {
|
| }
|
|
|
| void AutofillPopupBaseView::OnMouseMoved(const ui::MouseEvent& event) {
|
| - if (HitTestPoint(event.location()))
|
| - SetSelection(event.location());
|
| + if (HitTestPoint(gfx::ToFlooredPoint(event.location())))
|
| + SetSelection(gfx::ToFlooredPoint(event.location()));
|
| else
|
| ClearSelection();
|
| }
|
| @@ -161,8 +161,9 @@ bool AutofillPopupBaseView::OnMousePressed(const ui::MouseEvent& event) {
|
|
|
| void AutofillPopupBaseView::OnMouseReleased(const ui::MouseEvent& event) {
|
| // We only care about the left click.
|
| - if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location()))
|
| - AcceptSelection(event.location());
|
| + if (event.IsOnlyLeftMouseButton() &&
|
| + HitTestPoint(gfx::ToFlooredPoint(event.location())))
|
| + AcceptSelection(gfx::ToFlooredPoint(event.location()));
|
| }
|
|
|
| void AutofillPopupBaseView::OnGestureEvent(ui::GestureEvent* event) {
|
| @@ -170,15 +171,15 @@ void AutofillPopupBaseView::OnGestureEvent(ui::GestureEvent* event) {
|
| case ui::ET_GESTURE_TAP_DOWN:
|
| case ui::ET_GESTURE_SCROLL_BEGIN:
|
| case ui::ET_GESTURE_SCROLL_UPDATE:
|
| - if (HitTestPoint(event->location()))
|
| - SetSelection(event->location());
|
| + if (HitTestPoint(gfx::ToFlooredPoint(event->location())))
|
| + SetSelection(gfx::ToFlooredPoint(event->location()));
|
| else
|
| ClearSelection();
|
| break;
|
| case ui::ET_GESTURE_TAP:
|
| case ui::ET_GESTURE_SCROLL_END:
|
| - if (HitTestPoint(event->location()))
|
| - AcceptSelection(event->location());
|
| + if (HitTestPoint(gfx::ToFlooredPoint(event->location())))
|
| + AcceptSelection(gfx::ToFlooredPoint(event->location()));
|
| else
|
| ClearSelection();
|
| break;
|
|
|