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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 489213003: Prevent double acking of ignored touches (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to calling StopPropagation on ignored events. Created 6 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 | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 350066f7dd31e9e08c9ca72bf5f77377ab547e3e..7b40c71a06e473df88478d3fc1641b00d402875e 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -893,11 +893,11 @@ void WindowEventDispatcher::PreDispatchTouchEvent(Window* target,
ui::TouchEvent orig_event(*event, target, window());
// If the touch event is invalid in some way, the gesture recognizer will
- // reject it. In this case, stop the touch from reaching the next event
- // phase.
+ // reject it. This must call |StopPropagation()|, in order to prevent the
+ // touch from being acked in |PostDispatchEvent|.
if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(orig_event,
target)) {
- event->SetHandled();
+ event->StopPropagation();
}
}
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698