Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: ui/events/blink/input_handler_proxy.cc

Issue 2471523002: Make touch events uncancelable during fling when they are on the current active scroll layer (Closed)
Patch Set: fling layer Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/input/input_handler_manager.cc ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ae52f930a7bb120dafa969c6e244855a4024e0e6..d4d40a6a4ec22b2ad916e1e2fef608a2e28d638d 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -935,12 +935,19 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureFlingStart(
InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart(
const blink::WebTouchEvent& touch_event) {
EventDisposition result = DROP_EVENT;
+ bool maybe_passive_due_to_fling = false;
tdresser 2016/11/24 19:53:41 What does this bool actually mean? Should this be
lanwei 2016/11/24 20:28:01 Done.
for (size_t i = 0; i < touch_event.touchesLength; ++i) {
if (touch_event.touches[i].state != WebTouchPoint::StatePressed)
continue;
- if (input_handler_->DoTouchEventsBlockScrollAt(
+ cc::InputHandler::TouchStartEventListenerType event_listener_type =
+ input_handler_->EventListenerTypeForTouchStartAt(
gfx::Point(touch_event.touches[i].position.x,
- touch_event.touches[i].position.y))) {
+ touch_event.touches[i].position.y));
+ if (event_listener_type !=
+ cc::InputHandler::TouchStartEventListenerType::NO_HANDLER) {
+ maybe_passive_due_to_fling =
+ event_listener_type == cc::InputHandler::TouchStartEventListenerType::
+ HANDLER_ON_FLINGING_LAYER;
result = DID_NOT_HANDLE;
break;
}
@@ -992,7 +999,7 @@ 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 (is_fling_on_impl && maybe_passive_due_to_fling)
result = DID_NOT_HANDLE_NON_BLOCKING_DUE_TO_FLING;
return result;
« no previous file with comments | « content/renderer/input/input_handler_manager.cc ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698