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 18baa4cf33d4dd8cbcc16699b89b28e4d6451d49..3454dd72d2656bf76f40a668726e81cb42a755b6 100644 |
--- a/ui/events/blink/input_handler_proxy.cc |
+++ b/ui/events/blink/input_handler_proxy.cc |
@@ -835,12 +835,20 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureFlingStart( |
InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart( |
const blink::WebTouchEvent& touch_event) { |
EventDisposition result = DROP_EVENT; |
+ bool maybe_passive_due_to_fling = false; |
for (size_t i = 0; i < touch_event.touchesLength; ++i) { |
if (touch_event.touches[i].state != WebTouchPoint::StatePressed) |
continue; |
- if (input_handler_->DoTouchEventsBlockScrollAt( |
+ cc::EventListenerProperties event_result = |
+ input_handler_->DoTouchHandlersBlockScrollAt( |
gfx::Point(touch_event.touches[i].position.x, |
- touch_event.touches[i].position.y))) { |
+ touch_event.touches[i].position.y)); |
+ if (event_result != cc::EventListenerProperties::kNone) { |
+ maybe_passive_due_to_fling = |
+ event_result == |
+ cc::EventListenerProperties::kBlockingAndPassiveDueToFling |
+ ? true |
bokan
2016/11/15 22:42:40
No need for ? true : false
lanwei
2016/11/16 21:13:29
Done.
|
+ : false; |
result = DID_NOT_HANDLE; |
break; |
} |
@@ -892,7 +900,8 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart( |
} |
bool is_fling_on_impl = fling_curve_ && !fling_may_be_active_on_main_thread_; |
- if (result == DID_NOT_HANDLE && is_fling_on_impl) |
+ if (result == DID_NOT_HANDLE && is_fling_on_impl && |
+ maybe_passive_due_to_fling) |
result = DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING; |
return result; |