[wpt-sync] Sync PR 50912 - [anchor] Anchor recalculation point when switching fallbacks.
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 50912 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/50912
Details from upstream follow.
Morten Stenshorne <mstensho@chromium.org> wrote:
[anchor] Anchor recalculation point when switching fallbacks.
The spec says that an anchor recalculation point occurs when switching
to a different anchor positioning option, and not just when the element
gets displayed for the first time.In order to support this, we need to stay at the same position option as
long as it fits, rather than considering all fallback alternatives every
time an anchor-positioned box is being laid out. Only do that when the
current option doesn't fit.See https://drafts.csswg.org/css-anchor-position/#fallback-apply
This will introduce some statefulness, in that the current scroll offset
alone doesn't determine which position option is used: It depends on how
we got to that scroll offset, i.e. where we came from. Add a test to
demonstrate this, and fix some existing tests to pass with the new
behavior.Behavior behind runtime flag CSSAnchorPositionAreaVisualPosition.
Bug: 391907168, 373874012
Change-Id: I7b7f81d5d7a9009508eda03234f760bdfb7cd6f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6198263
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Morten Stenshorne \<mstensho@chromium.org>
Reviewed-by: David Grogan \<dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424129}
Assignee | ||
Updated•24 days ago
|
Assignee | ||
Comment 1•24 days ago
|
||
Assignee | ||
Comment 2•24 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI
Total 12 tests
Status Summary
Firefox
OK
: 10
FAIL
: 57[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 59[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt, GitHub]
Chrome
OK
: 10
PASS
: 42
FAIL
: 17
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-anchor-position/anchor-scroll-position-try-001.html [wpt.fyi]
- Should be above the anchor when at initial scroll position:
FAIL
(Chrome:PASS
) - Scroll down until the top edge of #anchor touches container but not overflowing:
FAIL
(Chrome:PASS
) - Scroll further down, making the first fallback position overflow by 1px:
FAIL
(Chrome:PASS
) - Scroll back up so that both the first and second options fit.:
FAIL
(Chrome:FAIL
) - Scroll further up, where the second option no longer fits:
FAIL
(Chrome:PASS
) - Scroll bottom-right to make the first two options overflow:
FAIL
(Chrome:PASS
)
- Should be above the anchor when at initial scroll position:
- /css/css-anchor-position/anchor-scroll-position-try-006.html [wpt.fyi]
- Should use the last (fourth) position option initially:
FAIL
(Chrome:PASS
) - Should still use the last position option as long as it fits.:
FAIL
(Chrome:FAIL
) - Should use the third position option with enough space below, and not enough above:
FAIL
(Chrome:PASS
) - Should use the second position option with enough space right:
FAIL
(Chrome:PASS
) - Should still use the second position option as long as it fits:
FAIL
(Chrome:FAIL
) - Should use the first position option with enough space below and right:
FAIL
(Chrome:PASS
)
- Should use the last (fourth) position option initially:
- /css/css-anchor-position/anchor-scroll-position-try-007.html [wpt.fyi]
- Should use the last position option initially:
FAIL
(Chrome:PASS
) - Should stay at initial position, since it still fits:
FAIL
(Chrome:FAIL
) - Should use the third position option with enough space left:
FAIL
(Chrome:PASS
) - Should use the first position option with enough space left and below:
FAIL
(Chrome:PASS
) - Should use the second position option with enough space below (and not enough above):
FAIL
(Chrome:PASS
)
- Should use the last position option initially:
- /css/css-anchor-position/anchor-scroll-position-try-008.html [wpt.fyi]
- Should use the last fallback position initially:
FAIL
(Chrome:PASS
) - Should use the third fallback position with enough space left:
FAIL
(Chrome:PASS
) - Should use the second fallback position with enough space above:
FAIL
(Chrome:PASS
) - Should use the first fallback position with enough space left and above:
FAIL
(Chrome:PASS
)
- Should use the last fallback position initially:
- /css/css-anchor-position/anchor-scroll-position-try-009.html [wpt.fyi]
- Should use the last fallback position initially:
FAIL
(Chrome:PASS
) - Should use the third fallback position with enough space right:
FAIL
(Chrome:PASS
) - Should use the second fallback position with enough space below:
FAIL
(Chrome:PASS
) - Should use the first fallback position with enough space right and below:
FAIL
(Chrome:PASS
)
- Should use the last fallback position initially:
- /css/css-anchor-position/anchor-scroll-position-try-010.html [wpt.fyi]
- Should use the last fallback position initially:
FAIL
(Chrome:PASS
) - Should use the third fallback position with enough space right:
FAIL
(Chrome:PASS
) - Should use the second fallback position with enough space above:
FAIL
(Chrome:PASS
) - Should use the first fallback position with enough space right and above:
FAIL
(Chrome:PASS
)
- Should use the last fallback position initially:
- /css/css-anchor-position/anchor-scroll-position-try-011.html [wpt.fyi]
- Should use the last fallback position initially:
FAIL
(Chrome:PASS
) - Should use the third fallback position with enough space above:
FAIL
(Chrome:PASS
) - Should use the second fallback position with enough space right:
FAIL
(Chrome:PASS
) - Should use the first fallback position with enough space above and right:
FAIL
(Chrome:PASS
)
- Should use the last fallback position initially:
- /css/css-anchor-position/position-area-scrolling-005.html [wpt.fyi]
- Initial scroll position:
FAIL
(Chrome:PASS
) - Scroll to 40,60:
FAIL
(Chrome:PASS
) - Scroll to 100,150:
FAIL
(Chrome:FAIL
) - Scroll to 0,0:
FAIL
(Chrome:FAIL
) - Redisplay at 0,0:
FAIL
(Chrome:PASS
) - Scroll to 750,100:
FAIL
(Chrome:FAIL
) - Scroll to 750,196:
FAIL
(Chrome:FAIL
) - Scroll to 195,196:
FAIL
(Chrome:FAIL
) - Scroll to 194,195:
FAIL
(Chrome:FAIL
) - Scroll to 194,194:
FAIL
(Chrome:FAIL
) - Redisplay at 194,194:
FAIL
(Chrome:PASS
)
- Initial scroll position:
- /css/css-anchor-position/position-area-scrolling-006.html [wpt.fyi]
- Initial scroll position:
FAIL
(Chrome:PASS
) - Scroll to the bottom:
FAIL
(Chrome:FAIL
) - Scroll to 500:
FAIL
(Chrome:FAIL
) - Scroll to 195:
FAIL
(Chrome:FAIL
) - Scroll to 194:
FAIL
(Chrome:FAIL
)
- Initial scroll position:
- /css/css-anchor-position/position-try-fallbacks-003.html [wpt.fyi]
- initial position:
FAIL
(Chrome:PASS
) - scroll to 100:
FAIL
(Chrome:PASS
) - scroll to 101:
FAIL
(Chrome:PASS
) - scroll back to 100:
FAIL
(Chrome:FAIL
) - redisplay at 100:
FAIL
(Chrome:PASS
) - scroll to 299:
FAIL
(Chrome:PASS
) - scroll to 300:
FAIL
(Chrome:PASS
) - scroll back to 0:
FAIL
(Chrome:FAIL
)
- initial position:
- /css/css-anchor-position/anchor-scroll-position-try-012.html [wpt.fyi]:
FAIL
(Chrome:PASS
) - /css/css-anchor-position/position-try-switch-from-fixed-anchor.html [wpt.fyi]:
FAIL
(Chrome:PASS
)
Comment 4•21 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/898ee1ac4835
https://hg.mozilla.org/mozilla-central/rev/c58201a92def
Description
•