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

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

Issue 1884863003: Non passive touch end or touch cancel listeners should not block scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
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 bc494871089e4fd218ce9325b398887d61a9f8ad..5148c346439711fe3ee8595e6732908c09536a55 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -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 as
tdresser 2016/04/13 16:52:35 look at the touch end handler
dtapuska 2016/04/13 18:00:15 Done.
+ // 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;
}

Powered by Google App Engine
This is Rietveld 408576698