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

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

Issue 2924953002: Ignore the rest of the scroll sequence if GSB is ignored. (Closed)
Patch Set: merged with master, redundant 'assert' deleted from function names. Created 3 years, 6 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
« no previous file with comments | « ui/events/blink/input_handler_proxy.h ('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 6ff1983d7139c16be4b7604726a8c80db40dea7f..1c3daab994cae54f590a2cb71e7e83e680285264 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -258,6 +258,7 @@ InputHandlerProxy::InputHandlerProxy(
#endif
gesture_scroll_on_impl_thread_(false),
gesture_pinch_on_impl_thread_(false),
+ scroll_sequence_ignored_(false),
fling_may_be_active_on_main_thread_(false),
disallow_horizontal_fling_scroll_(false),
disallow_vertical_fling_scroll_(false),
@@ -856,6 +857,7 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureScrollBegin(
result = DID_NOT_HANDLE;
break;
case cc::InputHandler::SCROLL_IGNORED:
+ scroll_sequence_ignored_ = true;
result = DROP_EVENT;
break;
}
@@ -872,6 +874,10 @@ InputHandlerProxy::HandleGestureScrollUpdate(
#ifndef NDEBUG
DCHECK(expect_scroll_update_end_);
#endif
+
+ if (scroll_sequence_ignored_)
+ return DROP_EVENT;
+
if (!gesture_scroll_on_impl_thread_ && !gesture_pinch_on_impl_thread_)
return DID_NOT_HANDLE;
@@ -933,6 +939,12 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureScrollEnd(
cc::ScrollState scroll_state = CreateScrollStateForGesture(gesture_event);
input_handler_->ScrollEnd(&scroll_state);
}
+
+ if (scroll_sequence_ignored_) {
+ scroll_sequence_ignored_ = false;
+ return DROP_EVENT;
+ }
+
if (!gesture_scroll_on_impl_thread_)
return DID_NOT_HANDLE;
« no previous file with comments | « ui/events/blink/input_handler_proxy.h ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698