Chromium Code Reviews| 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 074a309e045a43ef514afa1c672bd7bb5a927292..6149c8dab309eeed69264c496865d5e6d246d728 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| @@ -2004,18 +2004,25 @@ void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* 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 consume the event 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, to make sure that this event does not get |
| - // processed by the gesture recognizer before the events in the queue. |
| - if (host_->ShouldForwardTouchEvent()) |
| - event->StopPropagation(); |
| - |
| - if (point) { |
| - if (host_->ShouldForwardTouchEvent()) |
| + // 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, to make sure that this |
| + // event does not get processed by the gesture recognizer before the events in |
|
jdduke (slow)
2014/11/12 00:04:52
Could you split this sentence apart and perhaps ti
tdresser
2014/11/12 14:51:25
Done.
|
| + // the queue. |
| + if (host_->ShouldForwardTouchEvent()) { |
| + event->DisableSynchronousHandling(); |
| + if (point) { |
| host_->ForwardTouchEventWithLatencyInfo(touch_event_, *event->latency()); |
| - UpdateWebTouchEventAfterDispatch(&touch_event_, point); |
| + } else { |
| + // Fake an ack for the invalid touch event. |
| + DCHECK(window_->GetHost()); |
| + window_->GetHost()->dispatcher()->ProcessedTouchEvent(event, window_, |
|
jdduke (slow)
2014/11/12 00:04:52
I've been getting this arg packing style recently
tdresser
2014/11/12 14:51:24
It doesn't appear to be against the style guide.
h
|
| + ui::ER_HANDLED); |
| + } |
| } |
| + |
| + if (point) |
| + UpdateWebTouchEventAfterDispatch(&touch_event_, point); |
| } |
| void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) { |