[Interop] Make scroll event timing expectation match the spec - #61558
Open
chromium-wpt-export-bot wants to merge 1 commit into
Open
[Interop] Make scroll event timing expectation match the spec#61558chromium-wpt-export-bot wants to merge 1 commit into
chromium-wpt-export-bot wants to merge 1 commit into
Conversation
chromium-wpt-export-bot
marked this pull request as ready for review
July 28, 2026 14:55
This WPT is part of Interop 2026. When one scroll event e1 queues a scroll request for a different scroller, the WPT expected that the first scroll event e2 for the second scroll has to fire in the second iteration of the event loop after the request. The spec requirement here is more relaxed, effectively allowing e2 to fire in any iteration after the request. This CL updates the WPT to match the spec requirement. More details: - Scroll events are fired from the "run the scroll steps" algorithm in CSSOM View Module Level 1 (Step 2.4 in [1]), which is called from "window event loop" Step 3.9 in HTML event loop processing model [2]. - Queuing of scroll events is not synced with [1] or [2] at all: it is specified through an independent step "whenever an element gets scrolled" a few paragraphs above [1]. - After the WPT fires e1, the exact timing of the queuing (therefore the firing) of e2 remains UA-defined. Because the second request is for an instant scroll, Blink queues e2 synchronously in the same iteration of [2] that fired e1, and fires e2 in the first iteration afterwards. This timing conforms to the specs but fails the WPT. - This CL fixed the WPT by dropping the assertion that e2 must not fire in the next iteration. [1] https://drafts.csswg.org/cssom-view/#document-run-the-scroll-steps [2] https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model Fixed: 397737222 Change-Id: Ic87b3d72d096466510d3087308e76876ba45eac7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8046081 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/heads/main@{#1669472}
chromium-wpt-export-bot
force-pushed
the
chromium-export-cl-8046081
branch
from
July 28, 2026 14:55
8b0725b to
710ed61
Compare
wpt-pr-bot
approved these changes
Jul 28, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the Chromium project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This WPT is part of Interop 2026.
When one scroll event e1 queues a scroll request for a different
scroller, the WPT expected that the first scroll event e2 for the second
scroll has to fire in the second iteration of the event loop after the
request. The spec requirement here is more relaxed, effectively allowing
e2 to fire in any iteration after the request.
This CL updates the WPT to match the spec requirement.
More details:
CSSOM View Module Level 1 (Step 2.4 in [1]), which is called from
"window event loop" Step 3.9 in HTML event loop processing model [2].
specified through an independent step "whenever an element gets
scrolled" a few paragraphs above [1].
the firing) of e2 remains UA-defined. Because the second request is
for an instant scroll, Blink queues e2 synchronously in the same
iteration of [2] that fired e1, and fires e2 in the first iteration
afterwards. This timing conforms to the specs but fails the WPT.
fire in the next iteration.
[1] https://drafts.csswg.org/cssom-view/#document-run-the-scroll-steps
[2] https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model
Fixed: 397737222
Change-Id: Ic87b3d72d096466510d3087308e76876ba45eac7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8046081
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1669472}