Closed Bug 1597595 Opened 6 years ago Closed 1 year ago

[wpt-sync] Sync PR 20312 - Store ScrollAnchor adjustments outside of ScrollableArea

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 20312 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/20312
Details from upstream follow.

Chris Harrelson <chrishtr@chromium.org> wrote:

Store ScrollAnchor adjustments outside of ScrollableArea

This avoids issues where no-op sequences of layout updates and forced
layouts may cause user scrolls to be lost due to clamping. For example,
a forced layout may cause an anchor element to move down and also increase
scroll height; then that layout may be undone and cause the opposite.
If scroll anchor adjustments are not stored outside of ScrollableArea,
then the "undone" part will lose information about the true user scroll.

With this technique, a "no-op" rendering update that involves two mutations
to layout that are the opposite of each other, and that have impact
on scrollable area sizing, will now have a no-op impact on final scroll
offset.

Bug: 997502,988991,1022615
Change-Id: Ibd567005443dc7b0449ad97a0d886e8446cf876c

Reviewed-on: https://chromium-review.googlesource.com/1907598
WPT-Export-Revision: 4e5f9aaef4c18815da99c273403c17b8be371c60

Component: web-platform-tests → Layout: Scrolling and Overflow
Product: Testing → Core
Component: Layout: Scrolling and Overflow → web-platform-tests
Product: Core → Testing
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Severity: normal → S3
Status: REOPENED → RESOLVED
Closed: 5 years ago1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.