Index: ui/events/blink/input_handler_proxy.cc |
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc |
index 68fe30888a86861f71b63799bc83f8868084239b..2ac8c61b9e9e2e9156055464c83498232f3b150a 100644 |
--- a/ui/events/blink/input_handler_proxy.cc |
+++ b/ui/events/blink/input_handler_proxy.cc |
@@ -812,7 +812,7 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart( |
// If |result| is DROP_EVENT it wasn't processed above. |
if (result == DROP_EVENT) { |
switch (input_handler_->GetEventListenerProperties( |
- cc::EventListenerClass::kTouch)) { |
+ cc::EventListenerClass::kTouchStartOrMove)) { |
case cc::EventListenerProperties::kPassive: |
result = DID_HANDLE_NON_BLOCKING; |
break; |
@@ -843,6 +843,17 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart( |
touch_start_result_ == DROP_EVENT || result == DID_NOT_HANDLE) |
touch_start_result_ = result; |
+ // If |result| is still DROP_EVENT look at the touch end handler as |
+ // we may not want to discard the entire touch sequence. Note this |
+ // code is explicitly after the assignment of the |touch_start_result_| |
+ // so the touch moves are not sent to the main thread un-necessarily. |
+ if (result == DROP_EVENT && |
+ input_handler_->GetEventListenerProperties( |
+ cc::EventListenerClass::kTouchEndOrCancel) != |
+ cc::EventListenerProperties::kNone) { |
+ result = DID_HANDLE_NON_BLOCKING; |
+ } |
+ |
return result; |
} |