Hi,
In bug 1696384, I plan to enable
dom.event.wheel-deltaMode-lines.disabled on all channels.
This is a compat intervention for sites that check
WheelEvent.delta{X,Y,Z} before checking WheelEvent.deltaMode, generally
assuming that the deltas are going to be pixels.
These deltas are environment-specific, generally, and authors are always
expected to check the deltaMode to determine how to scroll, see:
https://w3c.github.io/uievents/#events-wheelevents
But other browsers historically have always returned pixels, and some
websites depend on that behavior. That makes Firefox feel super-slow on
those websites (as the site scrolls by e.g. 3 pixels rather than the
equivalent 3 lines of content). See bug 1392460 and webcompat issues
linked from there.
The behavior is the following, decided per event:
* If deltaMode has been accessed, or the feature is disabled, then
return the original delta mode and deltas (no behavior change from
current release).
* If deltaMode has _not_ been accessed, and it's DOM_DELTA_LINE,
accessing any of the deltas cause the event to always report
DOM_DELTA_PIXELS, and the deltas get appropriately converted to pixels too.
There are three prefs involved in controlling the behavior:
* dom.event.wheel-deltaMode-lines.disabled: This is the global switch
and if false the behavior doesn't change. If true, it implements the
behavior described above.
* dom.event.wheel-deltaMode-lines.always-disabled: This implements the
behavior of converting lines to pixels unconditionally (without
depending on event ordering etc). Mostly intended for debugging.
* dom.event.wheel-deltaMode-lines.always-enabled: This is a domain
list for domains that might need to switch to the previous behavior. I
really think that given how this is implemented it shouldn't cause
trouble for most websites (the pref has been on on nightly for 4 months,
with no serious regressions), so it should hopefully remain empty.
Let me know if you have any concerns with this or what not.
Cheers,
-- Emilio
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform