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 d6fcb1c4f8be948d350401fd1e234e4bea707931..e5ca61612f75eb3f1a044bbcbbcb0f23713724f6 100644 |
--- a/content/browser/renderer_host/input/input_router_impl.cc |
+++ b/content/browser/renderer_host/input/input_router_impl.cc |
@@ -257,6 +257,8 @@ bool InputRouterImpl::OnMessageReceived(const IPC::Message& message) { |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(InputRouterImpl, message) |
IPC_MESSAGE_HANDLER(InputHostMsg_HandleInputEvent_ACK, OnInputEventAck) |
+ IPC_MESSAGE_HANDLER(InputHostMsg_HandleUncancelableTouchMoveEvent_ACK, |
+ OnUncancelableTouchMoveAck) |
IPC_MESSAGE_HANDLER(InputHostMsg_DidOverscroll, OnDidOverscroll) |
IPC_MESSAGE_HANDLER(InputHostMsg_MoveCaret_ACK, OnMsgMoveCaretAck) |
IPC_MESSAGE_HANDLER(InputHostMsg_SelectRange_ACK, OnSelectMessageAck) |
@@ -356,10 +358,12 @@ 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); |
- if (WebInputEvent::isTouchEventType(input_event.type)) { |
+ bool ignores_ack = |
jdduke (slow)
2015/04/15 17:14:53
Let's change this to read:
|bool needs_synthetic_
lanwei
2015/04/17 20:49:00
Done.
|
+ !WebInputEventTraits::WillReceiveAckFromRenderer(input_event); |
+ if (WebInputEvent::isTouchEventType(input_event.type) && |
+ input_event.type != WebInputEvent::TouchMove) { |
const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event); |
- DCHECK_NE(ignores_ack, !!touch.cancelable); |
+ DCHECK_NE(ignores_ack, touch.cancelable); |
} |
// If we don't care about the ack disposition, send the ack immediately. |
@@ -405,7 +409,7 @@ bool InputRouterImpl::OfferToRenderer(const WebInputEvent& input_event, |
// Ack messages for ignored ack event types should never be sent by the |
// renderer. Consequently, such event types should not affect event time |
// or in-flight event count metrics. |
- if (!WebInputEventTraits::IgnoresAckDisposition(input_event)) { |
+ if (WebInputEventTraits::WillReceiveAckFromRenderer(input_event)) { |
input_event_start_time_ = TimeTicks::Now(); |
client_->IncrementInFlightEventCount(); |
} |
@@ -445,6 +449,10 @@ void InputRouterImpl::OnInputEventAck( |
Details<int>(&type)); |
} |
+void InputRouterImpl::OnUncancelableTouchMoveAck() { |
+ touch_event_queue_.ProcessUncancelableTouchMoveAck(); |
jdduke (slow)
2015/04/15 17:14:53
We also need:
client_->DecrementInFlightEventCoun
lanwei
2015/04/17 20:49:00
Done.
|
+} |
+ |
void InputRouterImpl::OnDidOverscroll(const DidOverscrollParams& params) { |
client_->DidOverscroll(params); |
} |