WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
289743
css-anchor-position-1-wpt
[css-anchor-position-1] Failing WPT tests
https://bugs.webkit.org/show_bug.cgi?id=289743
Summary
[css-anchor-position-1] Failing WPT tests
Kiet Ho
Reported
2025-03-13 15:54:49 PDT
imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-007.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-position-multicol-008.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scope-scroll.html imported/w3c/web-platform-tests/css/css-anchor-position/position-area-scrolling-004.tentative.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-fallback-transition-behavior.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scope-basic.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-001.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-006.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-007.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-008.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-009.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-position-try-010.html imported/w3c/web-platform-tests/css/css-anchor-position/anchor-size-parse-valid.html imported/w3c/web-platform-tests/css/css-anchor-position/last-successful-iframe.html imported/w3c/web-platform-tests/css/css-anchor-position/position-area-scrolling-001.tentative.html imported/w3c/web-platform-tests/css/css-anchor-position/position-area-scrolling-002.tentative.html imported/w3c/web-platform-tests/css/css-anchor-position/position-area-scrolling-005.html imported/w3c/web-platform-tests/css/css-anchor-position/position-area-scrolling-006.html imported/w3c/web-platform-tests/css/css-anchor-position/position-area-scrolling-007.html imported/w3c/web-platform-tests/css/css-anchor-position/position-try-fallbacks-003.html
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-03-13 15:56:41 PDT
<
rdar://problem/146993999
>
Kiet Ho
Comment 2
2025-03-13 16:07:22 PDT
Tim notices that
292089@main
doesn't fix the failures in LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-try-order-position-area.html LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-try-order-basic.html Then the test got changed (
https://github.com/web-platform-tests/wpt/commit/08aa9091e58d0c9c7b3f653c795cd80f8718bfdc
) so now they pass in WebKit. But the test change removed some cases that quite possibly, removed cases that WebKit failed. So needs more investigation here.
fantasai
Comment 3
2025-06-15 22:11:20 PDT
Analysis of WPT Failures Part 1!
https://wpt.fyi/results/css/css-anchor-position?label=experimental&label=master&aligned
anchor-animation-dynamic-name - Passes on trunk. anchor-center-fallback-transition-behavior - Seems to be an incorrect test? anchor-function-pseudo-element-basic - Passes on trunk. anchor-function-pseudo-element-implicit-anchor - Passes on trunk. anchor-getComputedStyle-002 - Fragmentation (multicol, inline) bug. (A,B) anchor-ident-function - Testing ident() function. Also other stuff that should be split out. anchor-name-inline-002 - Passes on trunk. anchor-name-multicol-* - Multicol bug. (A) anchor-position-borders-002 - Scrollbar gutter calculation bug. (C) anchor-position-flip-sibling-index - Testing sibling-index() function. anchor-position-grid-001 - Multicol bug. (A) anchor-position-inline-00[123] - Passes on trunk. anchor-position-inline-004 - Multicol bug. (A) anchor-position-multicol-* - Multicol bug. (A) anchor-position-sibling-index - Testing sibling-index() function. anchor-position-top-layer-* - Top layer bug. (D) anchor-scope-scroll - Off-by-one anchor-scope bug. (E) anchor-scope-shadow-names - ::part() names not scoped correctly. (F) anchor-scroll-003 - Multicol bug. (A) anchor-scroll-004 - Inline abspos containing blocks break stuff. (G) anchor-scroll-006 - No scroll adjustment for fixedpos anchored boxes. (H) anchor-scroll-007 - No scroll adjustment for fixedpos multi-anchored boxes. (H) anchor-scroll-chained - No scroll adjustment when anchored to scroll-adjusted anchored box. (I) anchor-scroll-fixedpos - No scroll adjustment for fixedpos anchored boxes. (H) anchor-scroll-js-expose - Element.offset*, IntersectionObserver not updated for scroll. Missing features unrelated to anchor positioning that cause us to fail tests in this directory: - ident() - sibling-index() Bugs related to anchor positioning that cause us to fail tests in this directory: A. Multicol fragmentation is not handled correctly. B. Inline fragmentation is not handled correctly? C. Non-overlay scrollbars unaccounted for in anchor() calculations. D. Anchoring relationships across top-level layers not handled correctly. E. Off-by-one error for anchor-scope: same element can name and scope to descendants. F. Names declared on ::part() not scoped to match light DOM slotted elements. G. Inline abspos containing blocks cause several miscalculations: - The positions of the anchored boxes are wrong. - They attach to the wrong element (always the last one) when multiple anchors share an anchor name. H. Anchored boxes with 'position: fixed' aren't scroll-adjusted. I. Boxes anchored to an anchored box that is scroll-adjusted aren't scroll-adjusted along with their anchor. J. Element.offset* is not updated by scroll-adjustments. K. IntersectionObserver is not fired when scroll-adjustment changes visibility. Other bugs noticed during triage: - anchor-scope changes don't cause style/layout invalidation, but should.
fantasai
Comment 4
2025-06-24 17:06:07 PDT
Analysis of WPT Failures Part 2!
https://wpt.fyi/results/css/css-anchor-position?label=experimental&label=master&aligned
anchor-scroll-position-try-* - Scrolling doesn't trigger fallback for anchor(). (J) anchor-scroll-to-sticky-00[34] - Anchored box painted underneath scrollbars in sibling. (K) anchor-scroll-update-003 - Seems to pass on trunk. anchor-scroll-update-00[56] - Zero-height anchor treated as invisible. (L) Also test seems to be wrong? anchor-scroll-update-007 - Seems to pass on trunk. anchor-transition-focus - Seems to pass on trunk. anchor-transition-name - Seems to pass on trunk. at-position-try-cssom - Seems to pass on trunk. last-successful-* - Successful option not remembered across style change. (M) popover-implicit-anchor - WPT harness failure. Test actually seems to pass on trunk. position-area-inline-container - Inline containing blocks not supported. position-area-pseudo-element-implicit-anchor - Passes on trunk. position-area-scrolling-00[123].tentative.html - Paints correctly, unsure about offset*. (O) position-area-scrolling-00[567].html - Container, not scrollable area, needs to trigger fallbacks. (P) position-try-backdrop - position-try on ::backdrop not supported. (Q) position-try-cascade-layer-reorder - @position-try changes don't invalidate correctly. (R) position-try-cascade - revert-layer should revert the @position-try origin only (S) position-try-container - container query height fails to cycle back into position-try fallback choice (T) position-try-fallbacks-003 - Fallback not triggered by scrolling CB. (P) position-try-grid-001 - anchor() fails to account for grid area (U) position-try-ident-function - Requires support for ident(). position-try-pseudo-elements - position-try not supported on ::before/::after (V) position-try-switch-to-fixed-anchor - fixed position scrolling not handled (H) position-try-tree-scoped - Open shadow DOM fails to inherit @position-try (W) position-visibility-anchors-valid - 'position-visibility: anchors-valid' unsupported (ZB) position-visibility-anchors-visible-chained - Chained visibility change invalidation failure (Z) position-visibility-anchors-visible-change-anchor - Change invalidation failure (Z) position-visibility-remove-*no-overflow* - 'position-visibility: no-overflow' unsupported (ZA) position-visibility-anchors-visible-with-position - Seems to be an incorrect test? position-visibility-remove-anchors-visible - Seems to be an incorrect test? transform-00*.tentative - Anchor rect fails to account for anchor transforms. (X) try-tactic-position-area - Need to simplify position-area serialization. (Y) Bugs related to anchor positioning that cause us to fail tests in this directory (continued): J. Scrolling the anchor doesn't trigger fallback when needed for anchor()-positioned box whose containing block is scroller. (Related to P.) K. Anchoring a box to the child of a sibling scroller paints it underneath that scroller's scrollbars. L. Zero-height anchors treated as invisible even if within visible range. M. Earlier try options are ignored if a previous layout attempt adopted a successful option further down the list. N. Inline absolute positioning containing blocks not supported. O. Tests check offsetTop/Left/Width/Height, but unclear these should change. P. Scrolling doesn't trigger fallback when needed for position-area box whose containing block is scroller. (Related to J.) Q. Missing support for anchor positioning on ::backdrop. R. @position-try changes don't invalidate and recalculate style correctly. S. revert-layer reverts the top author layer in addition to the position-try origin T. height from container query fails to cycle back into fallback choice U. anchor() functions don't account for grid area insets V. position-try-fallbacks not supported on ::before/::after W. Open shadow roots are unable to see @position-try rules from outer scopes (but correctly ignore inner scopes). X. Test expects anchor rect to reflect anchor box transforms. Y.
https://bugs.webkit.org/show_bug.cgi?id=291004
Z. Anchoring a box to an anchored box fails to hide or to invalidate correctly when the original anchor's visibility changes. ZA. 'position-visibility: no-overflow' unsupported ZB. 'position-visibility: anchors-valid' unsupported Other bugs noticed during triage: b. Scrolling the anchor partially out of view causes the anchored box to detach from the anchor. (anchor-scroll-position-try-001) c. Grid area insets don't trigger fallbacks. (position-try-grid variant) Possible spec issues: - Behavior required in J & P might not be well specified, and might conflict with other expecations, see e.g.
https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cdiv%20style%3D%22width%3A%20100px%3B%20height%3A%20100px%3B%20border%3A%20solid%3B%20overflow%3A%20scroll%3B%20position%3A%20relative%22%3E%0A%20%20%3Cdiv%20style%3D%22width%3A%20200px%3B%20height%3A%20200px%3B%20background%3A%20aqua%3B%22%3E%3C%2Fdiv%3E%0A%20%20%3Cdiv%20style%3D%22border%3A%20solid%20orange%2010px%3B%20position%3A%20absolute%3B%20top%3A%200%3B%20left%3A%200%3B%20right%3A%200%3B%20bottom%3A%200%22%3E%3C%2Fdiv%3E
and position-visibility-anchors-visible-with-position.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug