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

Unified Diff: views/widget/root_view.cc

Issue 3198005: Disable the stop button when the user is hovering it and the page finishes lo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « views/controls/button/custom_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/root_view.cc
===================================================================
--- views/widget/root_view.cc (revision 56775)
+++ views/widget/root_view.cc (working copy)
@@ -455,8 +455,11 @@
void RootView::OnMouseMoved(const MouseEvent& e) {
View* v = GetViewForPoint(e.location());
- // Find the first enabled view.
- while (v && !v->IsEnabled())
+ // Find the first enabled view, or the existing move handler, whichever comes
+ // first. The check for the existing handler is because if a view becomes
+ // disabled while handling moves, it's wrong to suddenly send ET_MOUSE_EXITED
+ // and ET_MOUSE_ENTERED events, because the mouse hasn't actually exited yet.
+ while (v && !v->IsEnabled() && (v != mouse_move_handler_))
v = v->GetParent();
if (v && v != this) {
if (v != mouse_move_handler_) {
« no previous file with comments | « views/controls/button/custom_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698