-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Implement scrolling events #31665
Description
In particular, run the scroll steps should integrate with a fixed HTML event-loop as in #31242 (see step 8 of https://html.spec.whatwg.org/multipage/#update-the-rendering).
Although we have scrolling code in script, I couldn't find any firing of the scroll and scrollend events as per the spec. Something new in the spec?
Also, note that we are currently batching scroll events in the compositor at
servo/components/compositing/compositor.rs
Line 1387 in 0e78c81
| // Batch up all scroll events into one, or else we'll do way too much painting. |
But a fixed HTML event-loop, and implementation of run the scroll steps, could have a similar batching effect(but be more spec compliant): we would fire events for all relevant elements and docs, but reflow only once(see step 20 of https://html.spec.whatwg.org/multipage/#update-the-rendering).