| 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 fd85fcc8745cdf59c93e87322518bda129aff961..7eababfb57781f04050ffd1048ebc03639c2ba94 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -805,6 +805,18 @@ void RenderWidgetHostViewAura::ParentHierarchyChanged() {
|
| HandleParentBoundsChanged();
|
| }
|
|
|
| +void RenderWidgetHostViewAura::MarkUnchangedTouchPointsAsStationary(
|
| + blink::WebTouchEvent* event,
|
| + int changed_touch_id) {
|
| + if (event->type == blink::WebInputEvent::TouchMove ||
|
| + event->type == blink::WebInputEvent::TouchCancel) {
|
| + for (size_t i = 0; i < event->touchesLength; ++i) {
|
| + if (event->touches[i].id != changed_touch_id)
|
| + event->touches[i].state = blink::WebTouchPoint::StateStationary;
|
| + }
|
| + }
|
| +}
|
| +
|
| void RenderWidgetHostViewAura::MovePluginWindows(
|
| const std::vector<WebPluginGeometry>& plugin_window_moves) {
|
| #if defined(OS_WIN)
|
| @@ -1282,10 +1294,14 @@ void RenderWidgetHostViewAura::ProcessAckedTouchEvent(
|
| break;
|
| }
|
|
|
| - // Only send acks for changed touches.
|
| + // Only send acks for one changed touch point.
|
| + bool sent_ack = false;
|
| for (size_t i = 0; i < touch.event.touchesLength; ++i) {
|
| - if (touch.event.touches[i].state == required_state)
|
| + if (touch.event.touches[i].state == required_state) {
|
| + DCHECK(!sent_ack);
|
| host->dispatcher()->ProcessedTouchEvent(window_, result);
|
| + sent_ack = true;
|
| + }
|
| }
|
| }
|
|
|
| @@ -2184,6 +2200,10 @@ void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) {
|
| // processed by the gesture recognizer before events currently awaiting
|
| // dispatch in the touch queue.
|
| event->DisableSynchronousHandling();
|
| +
|
| + // Set unchange touch point to StateStationary for touchmove and
|
| + // touchcancel to make sure only send one ack per WebTouchEvent.
|
| + MarkUnchangedTouchPointsAsStationary(&touch_event, event->touch_id());
|
| host_->ForwardTouchEventWithLatencyInfo(touch_event, *event->latency());
|
| }
|
|
|
|
|