Contact Email: tdre...@chromium.org
Spec
For details on this intervention, see the design doc here.
This intervention is explicitly allowed by the current Touch Event spec.
For maximum scroll performance, a user agent may not wait for each touch event associated with the scroll to be processed to see if it will be canceled. In such cases the user agent should generate touch events whose cancelable property is false, indicating that preventDefault cannot be used to prevent or interrupt scrolling.
Summary
We intend to replace the Touch Ack Timeout with an intervention which forces touch events to be uncancellable when the main thread is busy, allowing scrolling to take place immediately on the compositor thread.
Initially, we'll launch this as a Finch trial on Canary and Dev.
Motivation
80% of javascript event listeners that block scroll (touchstart, touchmove, wheel, mousewheel) do not actually prevent it.
On Android, in the 99’th percentile, it takes over 450ms to begin a scroll. In these extremely slow cases, the user experience would be better if the user agent didn’t bother waiting for the main thread.
For this intervention, we identify events which will cause scroll where the main thread is unlikely to respond quickly, and make them uncancellable, allowing scrolling to occur smoothly on the compositor thread. The only way to avoid this intervention will be to use touch-action to declaratively prevent scrolling, or ensure that the page’s main thread remains responsive.
Interoperability and Compatibility Risk:
Edge and Firefox have similar functionality to our existing Touch Ack Timeout. There is some risk here to rationality of the web platform, but we believe this intervention is strictly more rational than the existing Touch Ack Timeout, primarily since it allows developers to observe that the modified events are uncancellable.
Safari:
Safari has some odd behavior around long running touch event handlers, but it isn’t consistent.
Edge:
Edge appears to have something equivalent to the Touch Ack Timeout (verified experimentally on http://rbyers.github.io/touch-timeout.html)
Firefox:
The APZ content response timeout is equivalent to our Touch Ack Timeout.
https://bugzilla.mozilla.org/show_bug.cgi?id=1247280
Ongoing technical constraints
No.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
OWP launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/features/5754213783044096
Requesting approval to ship?
Requesting approval to perform Finch Trial on Canary and Dev.