Contact emails
Spec
Summary
Make addEventListener with type mousewheel from smoothscroll.js have passive event listeners by default.
Motivation
The smoothscroll.js code is largely broken and is preventing us from shipping scroll top interop. With the scroll top interop behavior activated sites fail to scroll at all with the wheel event. This library was corrected a few years ago but the web continues to clone the broken version and we have been blocked in shipping this long implemented fix for interop.
Smooth scroll has been enabled in Chrome for a number of releases so using custom smooth scrolling is not necessary anymore.
1400 of 470k of the top sites are using this broken code so activating the scroll top interop code isn't helpful when we break 0.3% of websites. The code has largely been placed inline in a sites common javascript files. So we propose examining the function name that matches the "ssc_wheel" name where the type of event is mousewheel and the target of the listener is the window.
Essentially pseudocode:
addEventListener(String event_type, Function f, EventListenerOptions? options) {
if (!options && event_type == "mousewheel" && this == window && f.name == "ssc_wheel") {
passive = true;
}
}
There is no guarantee that this is the last straw in the scroll top interop shipping path but it eliminates one road block that we have been largely unable to overcome.
Interoperability and Compatibility Risk
Certain risk occurs if someone uses the function name "ssc_wheel" they will magically get a passive event listener for mousewheel. We have examined the data available from http_archive and luckily ssc_wheel is not that common and is associated with this code.
Mousewheel is an non-standardized event; sad face.
The smoothscroll.js code looks for the chrome user agent so other vendors likely don't need to do this intervention.
There is also some risk that there are minified versions of the smoothscroll.js code that we are unable to detect. We will not know that until we ship the scroll top interop and receive bug reports.
Ongoing technical constraints
None
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/feature/5749447073988608
Requesting approval to ship?
Yes
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHXv1w%3DNYx1181UKe%3DR_hTkK%2BHNgVpNK9BJdSjhBXeqb8XSfWQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.y07hffxcidj3kv%40simons-mbp.lan.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.y07hffxcidj3kv%40simons-mbp.lan.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-jt89%3D0x7AWFJ5vRj2-bSAKEOhSejGV%2BposDNQP0jKmg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.y07hffxcidj3kv%40simons-mbp.lan.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-jt89%3D0x7AWFJ5vRj2-bSAKEOhSejGV%2BposDNQP0jKmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHTsfZCy7XO6zKYnO5ZMxyobodB5U-vLWH-f_zW32h5%3DN4dUDQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.y07hffxcidj3kv%40simons-mbp.lan.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-jt89%3D0x7AWFJ5vRj2-bSAKEOhSejGV%2BposDNQP0jKmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHTsfZCy7XO6zKYnO5ZMxyobodB5U-vLWH-f_zW32h5%3DN4dUDQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHXv1wmXt%3D_u_MBBrTUDbpxHg3fstSc4C4HgYazxpT0ZqP0msw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/op.y07hffxcidj3kv%40simons-mbp.lan.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-jt89%3D0x7AWFJ5vRj2-bSAKEOhSejGV%2BposDNQP0jKmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHTsfZCy7XO6zKYnO5ZMxyobodB5U-vLWH-f_zW32h5%3DN4dUDQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHXv1wmXt%3D_u_MBBrTUDbpxHg3fstSc4C4HgYazxpT0ZqP0msw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYeKvxv35xs0T%2BCKwNGktGVEtYihYx2oXwk%2BjBm-08yOXA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHXv1wns8sj4U7YjfconoxJ7bnKEX%2B2aS%3D8u6kd-2H%3D993wuyw%40mail.gmail.com.