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 129f34698a3b97b521c3dbc4f61b1194154da54f..71de449764d9ceb3429ba9e98eb92e4eafbe35b2 100644 |
--- a/content/browser/renderer_host/input/input_router_impl.cc |
+++ b/content/browser/renderer_host/input/input_router_impl.cc |
@@ -13,11 +13,11 @@ |
#include "content/browser/renderer_host/input/input_router_client.h" |
#include "content/browser/renderer_host/input/touch_event_queue.h" |
#include "content/browser/renderer_host/input/touchpad_tap_suppression_controller.h" |
-#include "content/browser/renderer_host/input/web_touch_event_traits.h" |
#include "content/browser/renderer_host/overscroll_controller.h" |
#include "content/common/content_constants_internal.h" |
#include "content/common/edit_command.h" |
#include "content/common/input/touch_action.h" |
+#include "content/common/input/web_touch_event_traits.h" |
#include "content/common/input_messages.h" |
#include "content/common/view_messages.h" |
#include "content/port/common/input_event_ack_state.h" |
@@ -446,8 +446,17 @@ void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event, |
OfferToRenderer(input_event, latency_info, is_keyboard_shortcut); |
+ // Touch events should always indicate in the event whether they are |
+ // cancelable (respect ACK disposition) or not. |
+ bool ignoresAck = |
+ WebInputEventTraits::IgnoresAckDisposition(input_event.type); |
+ if (WebInputEvent::isTouchEventType(input_event.type)) { |
+ DCHECK(!ignoresAck == |
+ static_cast<const blink::WebTouchEvent&>(input_event).cancelable); |
+ } |
+ |
// If we don't care about the ack disposition, send the ack immediately. |
- if (WebInputEventTraits::IgnoresAckDisposition(input_event.type)) { |
+ if (ignoresAck) { |
ProcessInputEventAck(input_event.type, |
jdduke (slow)
2014/04/23 21:55:47
Let's put the DCHECK inside this block (for the to
Rick Byers
2014/04/23 23:15:35
But I also want to DCHECK the other case as well -
jdduke (slow)
2014/04/23 23:29:49
Well, I was thinking of the impending case where o
|
INPUT_EVENT_ACK_STATE_IGNORED, |
latency_info, |