| Index: content/browser/renderer_host/input/input_router_impl.cc
|
| diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
|
| index 54bf892014c80b6884e624cdcdaac312c0817e46..7edf1d6f203c767ff6831c47839245e2b8c1d491 100644
|
| --- a/content/browser/renderer_host/input/input_router_impl.cc
|
| +++ b/content/browser/renderer_host/input/input_router_impl.cc
|
| @@ -347,8 +347,10 @@ void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
|
| // Touch events should always indicate in the event whether they are
|
| // cancelable (respect ACK disposition) or not.
|
| bool ignores_ack = WebInputEventTraits::IgnoresAckDisposition(input_event);
|
| + uint64 unique_touch_event_id = 0;
|
| if (WebInputEvent::isTouchEventType(input_event.type)) {
|
| const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event);
|
| + unique_touch_event_id = touch.uniqueTouchEventId;
|
| DCHECK_NE(ignores_ack, !!touch.cancelable);
|
| }
|
|
|
| @@ -357,6 +359,7 @@ void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
|
| ProcessInputEventAck(input_event.type,
|
| INPUT_EVENT_ACK_STATE_IGNORED,
|
| latency_info,
|
| + unique_touch_event_id,
|
| IGNORING_DISPOSITION);
|
| }
|
| }
|
| @@ -364,6 +367,7 @@ void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
|
| bool InputRouterImpl::OfferToClient(const WebInputEvent& input_event,
|
| const ui::LatencyInfo& latency_info) {
|
| bool consumed = false;
|
| + uint64 unique_touch_event_id = 0;
|
|
|
| InputEventAckState filter_ack =
|
| client_->FilterInputEvent(input_event, latency_info);
|
| @@ -372,7 +376,13 @@ bool InputRouterImpl::OfferToClient(const WebInputEvent& input_event,
|
| case INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS:
|
| // Send the ACK and early exit.
|
| next_mouse_move_.reset();
|
| - ProcessInputEventAck(input_event.type, filter_ack, latency_info, CLIENT);
|
| + if (WebInputEvent::isTouchEventType(input_event.type)) {
|
| + const WebTouchEvent& touch =
|
| + static_cast<const WebTouchEvent&>(input_event);
|
| + unique_touch_event_id = touch.uniqueTouchEventId;
|
| + }
|
| + ProcessInputEventAck(input_event.type, filter_ack, latency_info,
|
| + unique_touch_event_id, CLIENT);
|
| // WARNING: |this| may be deleted at this point.
|
| consumed = true;
|
| break;
|
| @@ -417,8 +427,8 @@ void InputRouterImpl::OnInputEventAck(
|
| ack.type == WebInputEvent::GestureScrollUpdate);
|
| OnDidOverscroll(*ack.overscroll);
|
| }
|
| -
|
| - ProcessInputEventAck(ack.type, ack.state, ack.latency, RENDERER);
|
| + ProcessInputEventAck(ack.type, ack.state, ack.latency,
|
| + ack.unique_touch_event_id, RENDERER);
|
| // WARNING: |this| may be deleted at this point.
|
|
|
| // This is used only for testing, and the other end does not use the
|
| @@ -489,6 +499,7 @@ void InputRouterImpl::ProcessInputEventAck(
|
| WebInputEvent::Type event_type,
|
| InputEventAckState ack_result,
|
| const ui::LatencyInfo& latency_info,
|
| + uint64 uniqueEventId,
|
| AckSource ack_source) {
|
| TRACE_EVENT2("input", "InputRouterImpl::ProcessInputEventAck",
|
| "type", WebInputEventTraits::GetName(event_type),
|
| @@ -511,7 +522,8 @@ void InputRouterImpl::ProcessInputEventAck(
|
| } else if (event_type == WebInputEvent::MouseWheel) {
|
| ProcessWheelAck(ack_result, latency_info);
|
| } else if (WebInputEvent::isTouchEventType(event_type)) {
|
| - ProcessTouchAck(ack_result, latency_info);
|
| + DCHECK_NE(uniqueEventId, 0UL);
|
| + ProcessTouchAck(ack_result, latency_info, uniqueEventId);
|
| } else if (WebInputEvent::isGestureEventType(event_type)) {
|
| ProcessGestureAck(event_type, ack_result, latency_info);
|
| } else if (event_type != WebInputEvent::Undefined) {
|
| @@ -592,9 +604,11 @@ void InputRouterImpl::ProcessGestureAck(WebInputEvent::Type type,
|
|
|
| void InputRouterImpl::ProcessTouchAck(
|
| InputEventAckState ack_result,
|
| - const ui::LatencyInfo& latency) {
|
| + const ui::LatencyInfo& latency,
|
| + uint64 unique_touch_event_id) {
|
| // |touch_event_queue_| will forward to OnTouchEventAck when appropriate.
|
| - touch_event_queue_.ProcessTouchAck(ack_result, latency);
|
| + touch_event_queue_.ProcessTouchAck(ack_result, latency,
|
| + unique_touch_event_id);
|
| }
|
|
|
| void InputRouterImpl::UpdateTouchAckTimeoutEnabled() {
|
|
|