Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_base_view.cc

Issue 933113002: Don't preview autofill/autocomplete until first real mouse move. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2c73a69060a54a7c8fd0566853b7be93189b3b70..f131ae5ac10c028962d9ea777a85c6dd28a7464e 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
@@ -143,6 +143,11 @@ void AutofillPopupBaseView::OnMouseExited(const ui::MouseEvent& event) {
}
void AutofillPopupBaseView::OnMouseMoved(const ui::MouseEvent& event) {
+ // A synthesized mouse move will be sent when the popup is first shown.
+ // Don't preview a suggestion if the mouse happens to be hovering there.
+ if (event.flags() & ui::EF_IS_SYNTHESIZED)
+ return;
+
if (HitTestPoint(event.location()))
SetSelection(event.location());
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698