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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 954973003: Always forward touch events to the TouchEventQueue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More validation Created 5 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
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 63c1609fa100e62bb3bdcdbd4d8c79807e5283ec..71d03da56bd6c6ee4cda058a688a2aaca8a90626 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2067,18 +2067,12 @@ void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) {
pointer_state_, event->may_cause_scrolling());
pointer_state_.CleanupRemovedTouchPoints(*event);
- // Forward the touch event only if a touch point was updated, and
- // there's a touch-event handler in the page, and no other
- // touch-event is in the queue. It is important to always mark
- // events as being handled asynchronously if there is a touch-event
- // handler in the page, or some touch-event is already in the queue,
- // even if no point has been updated. This ensures that this event
- // does not get processed by the gesture recognizer before events
- // currently awaiting dispatch in the touch queue.
- if (host_->ShouldForwardTouchEvent()) {
- event->DisableSynchronousHandling();
- host_->ForwardTouchEventWithLatencyInfo(touch_event, *event->latency());
- }
+ // It is important to always mark events as being handled asynchronously when
+ // they are forwarded. This ensures that the current event does not get
+ // processed by the gesture recognizer before events currently awaiting
+ // dispatch in the touch queue.
+ event->DisableSynchronousHandling();
+ host_->ForwardTouchEventWithLatencyInfo(touch_event, *event->latency());
}
void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) {

Powered by Google App Engine
This is Rietveld 408576698