Closed Bug 1822414 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 38998 - [anchor-position] Use scroll-adjusted IMCB for position fallback

Categories

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

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

[anchor-position] Use scroll-adjusted IMCB for position fallback

Previously, we've been using the inset-modified containing block for
position fallback, which doesn't work well with scrolling.

This patch fixes the issue by using the scroll-adjusted IMCB instead,
which was introduced earlier on the spec side [1].

As an implementation detail, this patch also calculates and stores
the non-overflowing scroll ranges [2] for each fallback position, so
that we can still use composited scrolling, and need to invalidate
layout only when we have scrolled out of that range.

This patch also adds WPT tests under various writing modes and
directions to cover all the new code paths.

[1] https://drafts4.csswg.org/css-anchor-position-1/#determine-the-position-fallback-styles
[2] https://github.com/w3c/csswg-drafts/issues/8059#issuecomment-1444616906

Fixed: 1418725
Change-Id: If9e104c6ac3c51ccdfc4fa7d3cf9cbffcc5af46d

Reviewed-on: https://chromium-review.googlesource.com/4292618
WPT-Export-Revision: 4a2a1d7beedee8cc7ec090e36f2dc5d9b9767628

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 7 tests and 3 subtests

Status Summary

Firefox

OK : 7
FAIL: 27

Chrome

OK : 7
PASS: 9
FAIL: 18

Safari

OK : 7
FAIL: 27

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-anchor-position/anchor-scroll-fallback-position-006.html [wpt.fyi]
    • Should use the last fallback position initially: FAIL (Chrome: PASS, Safari: FAIL)
    • Should use the third fallback position with enough space below: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the second fallback position with enough space right: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the first fallback position with enough space below and right: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/anchor-scroll-fallback-position-007.html [wpt.fyi]
    • Should use the last fallback position initially: FAIL (Chrome: PASS, Safari: FAIL)
    • Should use the third fallback position with enough space left: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the second fallback position with enough space below: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the first fallback position with enough space left and below: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/anchor-scroll-fallback-position-008.html [wpt.fyi]
    • Should use the last fallback position initially: FAIL (Chrome: PASS, Safari: FAIL)
    • Should use the third fallback position with enough space left: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the second fallback position with enough space above: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the first fallback position with enough space left and above: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/anchor-scroll-fallback-position-009.html [wpt.fyi]
    • Should use the last fallback position initially: FAIL (Chrome: PASS, Safari: FAIL)
    • Should use the third fallback position with enough space right: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the second fallback position with enough space below: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the first fallback position with enough space right and below: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/anchor-scroll-fallback-position-010.html [wpt.fyi]
    • Should use the last fallback position initially: FAIL (Chrome: PASS, Safari: FAIL)
    • Should use the third fallback position with enough space right: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the second fallback position with enough space above: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the first fallback position with enough space right and above: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/anchor-scroll-fallback-position-011.html [wpt.fyi]
    • Should use the last fallback position initially: FAIL (Chrome: PASS, Safari: FAIL)
    • Should use the third fallback position with enough space above: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the second fallback position with enough space right: FAIL (Chrome: FAIL, Safari: FAIL)
    • Should use the first fallback position with enough space above and right: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/position-fallback-003.html [wpt.fyi]
    • .anchored 1: FAIL (Chrome: PASS, Safari: FAIL)
    • .anchored 2: FAIL (Chrome: PASS, Safari: FAIL)
    • .anchored 3: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a7212124cfba [wpt PR 38998] - [anchor-position] Use scroll-adjusted IMCB for position fallback, a=testonly https://hg.mozilla.org/integration/autoland/rev/e1d3e990aba8 [wpt PR 38998] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.