| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index e3c2602b74c8bdd7d6976db1f6e2ee47f5720cf1..56508222adb364ab6ee0a0a13436b685b202dd8c 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 (WebInputEvent::isTouchEventType(input_event->type)) {
|
| + const WebTouchEvent& touch =
|
| + static_cast<const WebTouchEvent&>(*input_event);
|
| + if (touch.type == WebInputEvent::TouchMove && !touch.cancelable)
|
| + is_async_touch_move = true;
|
| + }
|
| + if (is_async_touch_move) {
|
| + InputHostMsg_HandleAsyncTouchEvent_ACK_Params ack;
|
| + ack.type = input_event->type;
|
| + response = scoped_ptr<IPC::Message>(
|
| + new InputHostMsg_HandleAsyncTouchEvent_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.
|
|
|