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

Unified Diff: ui/views/widget/root_view.cc

Issue 560053002: Do not interchange MOUSE_MOVED and MOUSE_DRAGGED events in Widget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 3 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
Index: ui/views/widget/root_view.cc
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index d05f1d8fd7bd2919ed6eab3ddf6ae5a9766d1215..81ee3e90780721f4cec5dd9eb992b8a27fad7785 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -429,6 +429,7 @@ bool RootView::OnMousePressed(const ui::MouseEvent& event) {
}
bool RootView::OnMouseDragged(const ui::MouseEvent& event) {
+ CHECK_EQ(ui::ET_MOUSE_DRAGGED, event.type());
if (mouse_pressed_handler_) {
SetMouseLocationAndFlags(event);
@@ -486,6 +487,7 @@ void RootView::OnMouseCaptureLost() {
}
void RootView::OnMouseMoved(const ui::MouseEvent& event) {
+ CHECK_EQ(ui::ET_MOUSE_MOVED, event.type());
View* v = GetEventHandlerForPoint(event.location());
// 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

Powered by Google App Engine
This is Rietveld 408576698