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..1db4aeef11ab7063e14e9d6932c1c56beb228bd2 100644 |
--- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc |
+++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc |
@@ -12,6 +12,10 @@ |
#include "ui/views/focus/focus_manager.h" |
#include "ui/views/widget/widget.h" |
+#if defined(OS_WIN) |
+#include <mmsystem.h> |
Evan Stade
2015/03/20 19:27:52
ewww
can you use TimeTicks or something?
please use gerrit instead
2015/03/20 20:55:53
event.time_stamp() is comparable to GetTickCount()
spang
2015/03/22 17:14:03
Please don't put this kind of workaround here with
|
+#endif |
+ |
namespace autofill { |
const SkColor AutofillPopupBaseView::kBorderColor = |
@@ -66,6 +70,10 @@ void AutofillPopupBaseView::DoShow() { |
// No animation for popup appearance (too distracting). |
widget->SetVisibilityAnimationTransition(views::Widget::ANIMATE_HIDE); |
+ |
+#if defined(OS_WIN) |
+ show_time_ = base::TimeDelta::FromMilliseconds(timeGetTime()); |
+#endif |
} |
SetBorder(views::Border::CreateSolidBorder(kPopupBorderThickness, |
@@ -143,8 +151,13 @@ 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) |
+ if (event.time_stamp() - show_time_ <= base::TimeDelta::FromMilliseconds(50)) |
+ return; |
+#else |
if (event.flags() & ui::EF_IS_SYNTHESIZED) |
return; |
+#endif |
if (HitTestPoint(event.location())) |
SetSelection(event.location()); |