Index: content/renderer/render_widget.cc |
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc |
index e3c2602b74c8bdd7d6976db1f6e2ee47f5720cf1..4310f13d11d633c1563908da6541ec966de68707 100644 |
--- a/content/renderer/render_widget.cc |
+++ b/content/renderer/render_widget.cc |
@@ -1225,12 +1225,30 @@ void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event, |
bool no_ack = ignore_ack_for_mouse_move_from_debugger_ && |
input_event->type == WebInputEvent::MouseMove; |
if (!WebInputEventTraits::IgnoresAckDisposition(*input_event) && !no_ack) { |
- InputHostMsg_HandleInputEvent_ACK_Params ack; |
- ack.type = input_event->type; |
- ack.state = ack_result; |
- ack.latency = swap_latency_info; |
- scoped_ptr<IPC::Message> response( |
- new InputHostMsg_HandleInputEvent_ACK(routing_id_, ack)); |
+ // Send AsyncTouchEvent_ACK for async touch moves, and InputEvent_ACK for |
+ // all other types of events. |
+ scoped_ptr<IPC::Message> response; |
+ bool is_async_touch_move = false; |
+ if (input_event->type == WebInputEvent::TouchMove) { |
+ const WebTouchEvent& touch = |
+ static_cast<const WebTouchEvent&>(*input_event); |
+ if (!touch.cancelable) |
+ is_async_touch_move = true; |
+ } |
+ if (is_async_touch_move) { |
+ InputHostMsg_HandleUncancelableTouchMoveEvent_ACK_Params ack; |
+ response = scoped_ptr<IPC::Message>( |
+ new InputHostMsg_HandleUncancelableTouchMoveEvent_ACK(routing_id_, |
+ ack)); |
+ } else { |
+ InputHostMsg_HandleInputEvent_ACK_Params ack; |
+ ack.type = input_event->type; |
+ ack.state = ack_result; |
+ ack.latency = swap_latency_info; |
+ response = scoped_ptr<IPC::Message>( |
+ new InputHostMsg_HandleInputEvent_ACK(routing_id_, ack)); |
+ } |
+ |
if (rate_limiting_wanted && frame_pending && !is_hidden_) { |
// We want to rate limit the input events in this case, so we'll wait for |
// painting to finish before ACKing this message. |