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

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

Issue 1018393002: [autofill] Ingore mouse move on Windows for the first 50ms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unusued variable warning treated as error on non-Windows. Created 5 years, 9 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 | « chrome/browser/ui/views/autofill/autofill_popup_base_view.h ('k') | 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 dca545416fd2d491f7ad4693afd73de8bfe80cd8..eeb3582a8c52a315c3f70c6f8ac3546ae187159e 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
@@ -66,6 +66,8 @@ void AutofillPopupBaseView::DoShow() {
// No animation for popup appearance (too distracting).
widget->SetVisibilityAnimationTransition(views::Widget::ANIMATE_HIDE);
+
+ show_time_ = base::Time::Now();
}
SetBorder(views::Border::CreateSolidBorder(kPopupBorderThickness,
@@ -143,8 +145,14 @@ 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 defined(OS_WIN)
+ static const int64 kMouseMoveIngoreMs = 50;
+ if ((base::Time::Now() - show_time_).InMilliseconds() <= kMouseMoveIngoreMs)
Evan Stade 2015/03/19 20:16:30 if (base::Time::Now() < show_time_ + TimeDelta::Fr
please use gerrit instead 2015/03/20 17:36:43 Done.
+ return;
+#else
if (event.flags() & ui::EF_IS_SYNTHESIZED)
return;
+#endif
if (HitTestPoint(event.location()))
SetSelection(event.location());
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_popup_base_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698