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

Unified Diff: chrome/views/root_view.cc

Issue 40124: Revert r9953 since it caused regressions like: (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/views/event.h ('k') | chrome/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/root_view.cc
===================================================================
--- chrome/views/root_view.cc (revision 10904)
+++ chrome/views/root_view.cc (working copy)
@@ -269,19 +269,8 @@
}
bool RootView::OnMousePressed(const MouseEvent& e) {
- static View* last_click_handler = 0;
-
- // This function is not to handle non-client messages, so we return that
- // we are not handling it quickly except for the double-click because we
- // need to absorb it when it occurs on a different view than its single
- // click part.
- if ((e.GetFlags() & MouseEvent::EF_IS_NON_CLIENT) &&
- !(e.GetFlags() & MouseEvent::EF_IS_DOUBLE_CLICK)) {
- last_click_handler = 0;
- return false;
- }
-
UpdateCursor(e);
+
SetMouseLocationAndFlags(e);
// If mouse_pressed_handler_ is non null, we are currently processing
@@ -311,8 +300,6 @@
const MouseEvent mouse_pressed_event(e, this, mouse_pressed_handler_);
drag_info.Reset();
const bool handled =
- (!(e.GetFlags() & MouseEvent::EF_IS_DOUBLE_CLICK) ||
- (mouse_move_handler_ == last_click_handler)) &&
mouse_pressed_handler_->ProcessMousePressed(mouse_pressed_event,
&drag_info);
@@ -329,10 +316,8 @@
// If the view handled the event, leave mouse_pressed_handler_ set and
// return true, which will cause subsequent drag/release events to get
// forwarded to that view.
- if (handled) {
- last_click_handler = mouse_pressed_handler_;
+ if (handled)
return true;
- }
}
// Reset mouse_pressed_handler_ to indicate that no processing is occurring.
@@ -348,15 +333,6 @@
NOTIMPLEMENTED();
#endif
}
-
- // If we go through the whole hierarchy and we did not find the same handler
- // for the double-click as we did for the single-click, then mark it as
- // handled to eat up any double-click that ends up in a different location
- // than its single-click part.
- if (last_click_handler && e.GetFlags() & MouseEvent::EF_IS_DOUBLE_CLICK)
- hit_disabled_view = true;
-
- last_click_handler = 0;
return hit_disabled_view;
}
« no previous file with comments | « chrome/views/event.h ('k') | chrome/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698