Closed Bug 1515441 Opened 7 years ago Closed 2 years ago

[wpt-sync] Sync PR 14605 - Snap after layout change

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14605 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/14605 Details from upstream follow. Sandra Sun <sunyunjia@chromium.org> wrote: > Snap after layout change > > As the spec mentions, if the content or layout of the document changes (e.g. > content is added, moved, deleted, resized) such that the content of a snapport > changes, the UA must re-evaluate the resulting scroll position, and re-snap if > required. If the scroll container was snapped before the content change and that > same snap position still exists (e.g. its associated element was not deleted), > the scroll container must be re-snapped to that same snap position after the > content change. > > This patch adds SnapForAllContainers() right after UpdateAllSnapContainerData() > during PerformPostLayoutTasks() and adds tests for that. > > Some scroll snap tests assume that a scroller's initial scroll position is (0,0) > even with one and only non-zero snap position. This assumption won't hold true > after this change since the scroller would snap at the snap position at the > beginning. So we add an anchor snap element at (0,0) to ensure the scroller > always starts at (0,0) for the tests. > > This patch also fixes a bug in VisualViewport::MaximumScrollOffset(). > Bug: 866127 > Change-Id: Ib050ef91b04d4391a846eda3dbf667e4d412cb08 > > Reviewed-on: https://chromium-review.googlesource.com/1340567 > WPT-Export-Revision: 856f64763fced8e3fe6f3c38fc677ff4d5b34ee1
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Severity: normal → S3
Status: REOPENED → RESOLVED
Closed: 6 years ago2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.