Files
Peng Zhou 648de4103f Bug 2022135 [wpt PR 58368] - ScrollAnchor: clear queued_ when adjustment is suppressed during editing, a=testonly
Automatic update from web-platform-tests
ScrollAnchor: clear queued_ when adjustment is suppressed during editing

During editing, an internal `UpdateStyleAndLayout` call can trigger
`NotifyBeforeLayout` and set `queued_ = true`.` Adjust` is then invoked
under `SuppressScrollAnchorScope`, but `queued_` is not cleared, leaving
it set. As a result, the next real layout change skips `Adjust`, so the
scroller's `ScrollOffset` is not updated and scroll anchoring uses stale
state, causing a large scroll jump.

Fix by clearing `queued_` even when the adjustment is suppressed.

Bug: 489769217
Change-Id: I508505c9079d7d0e8ca4c27a3104012096acab4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7636856
Reviewed-by: Robert Flack <[email protected]>
Commit-Queue: Peng Zhou <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1596533}

--

wpt-commits: efd49dae82e85d023283c4fea59d95abb60439f4
wpt-pr: 58368
2026-03-12 15:59:04 +00:00
..
…
…

Scroll Anchoring Test Suite

Scroll anchoring adjusts the scroll position to prevent visible jumps (or "reflows") when content changes above the viewport.