Skip to content

Snapshot post-layout for all but scroll-timelines#58613

Merged
chromium-wpt-export-bot merged 2 commits intomasterfrom
chromium-export-cl-7673480
Apr 3, 2026
Merged

Snapshot post-layout for all but scroll-timelines#58613
chromium-wpt-export-bot merged 2 commits intomasterfrom
chromium-export-cl-7673480

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 19, 2026

'Run snapshot post-layout state steps' was introduced in the CSSOM View
spec[1] to formalize when state for scroll-state() queries, anchor
position effects based on scrolling, and scroll-timeline progress is
updated.

There is a pull request[2] to tell when to invoke snapshotting from the
HTML event loop. This CL aligns snapshotting with that CL for all
snapshotting except for scroll-timelines.

scroll-timeline-multi-pass.tentative.html is updated to align with the
one-snapshot-per-resizeObserver-loop-iteration in the HTML spec PR. The
difference between scroll-timelines and other snapshotting is that the
scroll-timelines are still snapshotted before the first style/layout
update in the resizeObserver loop.

The reason we keep the pre-layout snapshotting of scroll-timelines for
now is that timleines are only progressed before the first style/layout
update, which means the post-layout snapshotting will always cause
scroll-timelines to be a frame late (with the exception of the first
frame) unless we start allowing scroll-timelines to progress in the
resizeObserver loop.

[1] https://drafts.csswg.org/cssom-view/#run-snapshot-post-layout-state-steps
[2] whatwg/html#11613

Bug: 384523570
Change-Id: Iabb35fd06e5a2b9a95a09a25d27d7baad545653f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7673480
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1601971}

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@jonathan-j-lee
Copy link
Copy Markdown
Contributor

WPT Command: python3 ./wpt run --channel=nightly --verify --verify-no-chaos-mode --verify-repeat-loop=0 --verify-repeat-restart=10 --github-checks-text-file=/home/test/artifacts/checkrun.md --affected base_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --verify-log-full --no-headless --binary=/home/test/build/firefox/firefox firefox

Some affected tests had inconsistent (flaky) results:

Unstable results

Test Subtest Results Messages
/scroll-animations/css/scroll-timeline-multi-pass.tentative.html ERROR: 8/10, OK: 2/10

These may be pre-existing or new flakes. Please try to reproduce (see the above WPT command, though some flags may not be needed when running locally) and determine if your change introduced the flake. If you are unable to reproduce the problem, please tag @web-platform-tests/wpt-core-team in a comment for help.

'Run snapshot post-layout state steps' was introduced in the CSSOM View
spec[1] to formalize when state for scroll-state() queries, anchor
position effects based on scrolling, and scroll-timeline progress is
updated.

There is a pull request[2] to tell when to invoke snapshotting from the
HTML event loop. This CL aligns snapshotting with that CL for all
snapshotting except for scroll-timelines.

scroll-timeline-multi-pass.tentative.html is updated to align with the
one-snapshot-per-resizeObserver-loop-iteration in the HTML spec PR. The
difference between scroll-timelines and other snapshotting is that the
scroll-timelines are still snapshotted before the first style/layout
update in the resizeObserver loop.

The reason we keep the pre-layout snapshotting of scroll-timelines for
now is that timleines are only progressed before the first style/layout
update, which means the post-layout snapshotting will always cause
scroll-timelines to be a frame late (with the exception of the first
frame) unless we start allowing scroll-timelines to progress in the
resizeObserver loop.

[1] https://drafts.csswg.org/cssom-view/#run-snapshot-post-layout-state-steps
[2] whatwg/html#11613

Bug: 384523570
Change-Id: Iabb35fd06e5a2b9a95a09a25d27d7baad545653f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7673480
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1601971}
@jonathan-j-lee jonathan-j-lee force-pushed the chromium-export-cl-7673480 branch from c1131d1 to d915139 Compare April 3, 2026 18:26
@jonathan-j-lee jonathan-j-lee force-pushed the chromium-export-cl-7673480 branch from d915139 to 8377e06 Compare April 3, 2026 19:15
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit a7f2794 into master Apr 3, 2026
17 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-7673480 branch April 3, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants