Chromium Code Reviews
DescriptionDon't send touch move to renderer while scrolling
This patch tries to optimize this case:
A scrollable webpage has a touch handler listening to touch move but
does not prevent-default on touch move.
When the touch handler does not call prevent default on touch move,
the touch move events will come back to browser process and can
generate scroll events. While the page is scrolled, we want to stop
sending the touch move events to the touch handler, trying to avoid
the scrolling being blocked on waiting for each touch move to be ACKed
from renderer. We will still send any touch end events to the page.
BUG=240735, 251810
TEST=1. enable the flag #enable-no-touch-to-renderer-while-scrolling
in chrome://flags
2. go to www.rbyers.net/eventTest.html
scroll the page, one should see touch move stops being received
when scroll stops, one should see touch end to all existing touches
3. go to www.rbyers.net/janky-touch-scroll.html
scroll the page and one should see smooth scrolling
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217454
Patch Set 1 #
Total comments: 16
Patch Set 2 : moved logic to render_widget_host_impl.cc #Patch Set 3 : rebased #Patch Set 4 : fix the case touch event queue could be empty when GetLatestEvent() is called #
Total comments: 8
Patch Set 5 : fix unitttests #Patch Set 6 : rebase/switch to model of "no-touch-while-scrolling & touch-end after scrolling stops" #
Total comments: 8
Patch Set 7 : use TEQ::ShouldForwardToRenderer() instead of ImmediateInputRouter::ShouldForwardTouchEvent() to de… #Patch Set 8 : tests added #
Total comments: 4
Patch Set 9 : use ScrollBegin instead of ScrollUpdate as the indication of stop sending touch move & rebase #
Total comments: 2
Messages
Total messages: 35 (0 generated)
|