Closed Bug 1856488 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42300 - [anchor-position] Implement per-axis scroll adjustment

Categories

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

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

[anchor-position] Implement per-axis scroll adjustment

The spec recently refined the scroll adjustment to be per-axis [1].
This patch implements that in Blink by:

  1. Store whether scroll adjustment is needed in NGLayoutResult's
    rare data. This is because the info depends on the used style,
    which isn't available before layout. Besides, the rare data isn't
    populated if neither axis needs scroll adjustment, so we won't
    create a rare data for every out-of-flow object.

  2. Use the per-axis info to calculate the translation offset on both
    main thread and compositor.

This patch also renames a few HasTranslation to
NeedsScrollAdjustment to match the terms defined in the spec.

[1] https://drafts.csswg.org/css-anchor-position-1/#needs-scroll-adjustment

Bug: 1473388
Change-Id: I55242103550f06db92910659613b54564c81f1f0

Reviewed-on: https://chromium-review.googlesource.com/4865596
WPT-Export-Revision: e309958b647129175fd5092bd658bca2076a6805

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 1 subtests

Status Summary

Firefox

OK : 2
FAIL: 4

Chrome

OK : 2
PASS: 1
FAIL: 3

Safari

OK : 2
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de870a121ddb [wpt PR 42300] - [anchor-position] Implement per-axis scroll adjustment, a=testonly https://hg.mozilla.org/integration/autoland/rev/428cdae47273 [wpt PR 42300] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.