Commit fe4b9ea5 authored by Sahel Sharify's avatar Sahel Sharify Committed by Commit Bot

Revert "Filter GestureScrollUpdate during scroll fling."

Original cl reviewed on https://chromium-review.googlesource.com/727464

Reason for revert: The original cl causes the following regression and
with browser side fling and async wheel events it's not needed anymore.

Regression: Touchpad scrolling disables wheel scrolling since GSU events
generated from wheel scrolling get filtered here:
https://cs.chromium.org/chromium/src/content/browser/renderer_host/input/gesture_event_queue.cc?q=Gesture_Event_queue&dr=C&l=130

fling_in_progress_ gets reset on GFC which is received when the user
puts their fingers on touchpad, so if the user scrolls with touchpad
first and then starts a subsequent wheel scrolling no GFC will be
received after the GFS and fling_in_progress_ will be still true while
GSU events from wheel scrolling are arriving.

Bug: 817479, 717205
Change-Id: I3997f756430df432aab37e5af77e1409dc8e0225
Reviewed-on: https://chromium-review.googlesource.com/1014415Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551330}
parent c5ca9f13
...@@ -127,8 +127,6 @@ bool GestureEventQueue::ShouldForwardForBounceReduction( ...@@ -127,8 +127,6 @@ bool GestureEventQueue::ShouldForwardForBounceReduction(
switch (gesture_event.event.GetType()) { switch (gesture_event.event.GetType()) {
case WebInputEvent::kGestureScrollUpdate: case WebInputEvent::kGestureScrollUpdate:
if (fling_in_progress_)
return false;
if (!scrolling_in_progress_) { if (!scrolling_in_progress_) {
debounce_deferring_timer_.Start( debounce_deferring_timer_.Start(
FROM_HERE, FROM_HERE,
......
...@@ -1105,9 +1105,9 @@ TEST_F(GestureEventQueueTest, DebounceEndsWithFlingStartEvent) { ...@@ -1105,9 +1105,9 @@ TEST_F(GestureEventQueueTest, DebounceEndsWithFlingStartEvent) {
EXPECT_EQ(0U, GestureEventDebouncingQueueSize()); EXPECT_EQ(0U, GestureEventDebouncingQueueSize());
// Verify that the coalescing queue contains the correct events. // Verify that the coalescing queue contains the correct events.
WebInputEvent::Type expected[] = {WebInputEvent::kGestureScrollUpdate, WebInputEvent::Type expected[] = {
WebInputEvent::kGestureScrollEnd, WebInputEvent::kGestureScrollUpdate, WebInputEvent::kGestureScrollEnd,
WebInputEvent::kGestureScrollBegin}; WebInputEvent::kGestureScrollBegin, WebInputEvent::kGestureScrollUpdate};
for (unsigned i = 0; i < sizeof(expected) / sizeof(WebInputEvent::Type); for (unsigned i = 0; i < sizeof(expected) / sizeof(WebInputEvent::Type);
i++) { i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment