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

Unified Diff: content/renderer/input/main_thread_event_queue.cc

Issue 2479023003: Remove is_fling flag for fling intervention (Closed)
Patch Set: Make enum explicitly 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
Index: content/renderer/input/main_thread_event_queue.cc
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc
index 64eb81571ad0079f9604a0811fe5f4889425a1bc..45ee0814ff84418deb0e5bddfcc98afc7bde581f 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -68,7 +68,6 @@ MainThreadEventQueue::MainThreadEventQueue(
blink::scheduler::RendererScheduler* renderer_scheduler)
: routing_id_(routing_id),
client_(client),
- is_flinging_(false),
last_touch_start_forced_nonblocking_due_to_fling_(false),
enable_fling_passive_listener_flag_(base::FeatureList::IsEnabled(
features::kPassiveEventListenersDueToFling)),
@@ -89,6 +88,7 @@ bool MainThreadEventQueue::HandleEvent(
DCHECK(original_dispatch_type == DISPATCH_TYPE_BLOCKING ||
original_dispatch_type == DISPATCH_TYPE_NON_BLOCKING);
DCHECK(ack_result == INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING ||
+ ack_result == INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING_DUE_TO_FLING ||
ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
bool non_blocking = original_dispatch_type == DISPATCH_TYPE_NON_BLOCKING ||
@@ -99,7 +99,7 @@ bool MainThreadEventQueue::HandleEvent(
if (is_touch) {
blink::WebTouchEvent* touch_event =
static_cast<blink::WebTouchEvent*>(event.get());
- touch_event->dispatchedDuringFling = is_flinging_;
+
// Adjust the |dispatchType| on the event since the compositor
// determined all event listeners are passive.
if (non_blocking) {
@@ -114,7 +114,8 @@ bool MainThreadEventQueue::HandleEvent(
touch_event->dispatchType == blink::WebInputEvent::Blocking) {
// If the touch start is forced to be passive due to fling, its following
// touch move should also be passive.
- if (is_flinging_ || last_touch_start_forced_nonblocking_due_to_fling_) {
+ if (ack_result == INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING_DUE_TO_FLING ||
+ last_touch_start_forced_nonblocking_due_to_fling_) {
touch_event->dispatchType =
blink::WebInputEvent::ListenersForcedNonBlockingDueToFling;
non_blocking = true;
« no previous file with comments | « content/renderer/input/main_thread_event_queue.h ('k') | content/renderer/input/main_thread_event_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698