Open Bug 1688022 Opened 4 years ago Updated 3 months ago

Unship the `overflow`/`underflow` events

Categories

(Core :: Layout: Scrolling and Overflow, task)

task

Tracking

()

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Given that these events are non-standard and not on track to become a standard I think we should unship them.
Chrome used to support a similar but incompatible overflowchanged event, but they removed it in ~2014 according to:
https://groups.google.com/a/chromium.org/g/blink-dev/c/1RCzsyEyNU8/m/5vNpxrhRbUIJ
(I checked a recent Chrome and it's still gone.)
That indicates to me that this functionality likely isn't needed by web developers.

FYI, the implementation of these events in Gecko have a history of causing crashes and security issues so we really want to remove them in their current form.

We use these events internally to implement a poly-fill for text-overflow:fade though:
https://searchfox.org/mozilla-central/search?q=%5Btextoverflow&path=
so we need to keep them "ChromeOnly" for now, until we implement that CSS feature.

Component: DOM: Events → Layout: Scrolling and Overflow

I moved to layout, since it is layout code which is creating and dispatching these events. So most of the work would be layout related.

Olli, do you know if we have (content process) counters for these events by chance? Or if not, where I could add them?

Flags: needinfo?(bugs)

You mean counters for event listeners for them?
We don't, but something like https://searchfox.org/mozilla-central/rev/8dae1cc76a6b45e05198bc0d5d4edb7bf1003265/dom/events/EventListenerManager.cpp#382-403 could be done.

Flags: needinfo?(bugs)
Depends on: 1688089
Depends on: 1888737
Type: enhancement → task

GitHub code search: 1.1k files
https://github.com/search?q=addeventlistener%28%27overflow%27+OR+addeventlistener%28%27underflow%27+OR+addeventlistener%28%22overflow%22+OR+addeventlistener%28%22underflow%22&type=code

httparchive query on sample_data (10k pages) finds nothing. I could run it on the full dataset if needed (NI me if so).

The change made in Bug 1888737 cause Tree Style Tab addon to not be able to scroll anymore.
TST issue: https://github.com/piroor/treestyletab/issues/3554
Maybe other addons are affected as well?

Please file a new bug for this issue.

Depends on: 1907460
Depends on: 1913278
You need to log in before you can comment on or make changes to this bug.