RESOLVED FIXED294129
[css-anchor-position-1] anchor-name mutation doesn't propagate to its anchor-positioned dependency
https://bugs.webkit.org/show_bug.cgi?id=294129
Summary [css-anchor-position-1] anchor-name mutation doesn't propagate to its anchor-...
Kiet Ho
Reported 2025-06-06 10:58:13 PDT
Created attachment 475498 [details] Test case See test case. When the same anchor-name is reassigned from one element to another, we don't invalidate the style of anchor-positioned elements that anchors to that anchor name.
Attachments
Test case (1.32 KB, text/html)
2025-06-06 10:58 PDT, Kiet Ho
no flags
Another test case (370 bytes, text/html)
2025-06-06 11:15 PDT, Kiet Ho
no flags
Another test case (1.29 KB, text/html)
2025-06-09 14:33 PDT, Kiet Ho
no flags
Radar WebKit Bug Importer
Comment 1 2025-06-06 10:58:21 PDT
Kiet Ho
Comment 2 2025-06-06 11:15:38 PDT
Created attachment 475499 [details] Another test case Another test case (may or may not be the same issue)
Kiet Ho
Comment 3 2025-06-09 14:33:27 PDT
Created attachment 475515 [details] Another test case In this test case, the anchor-positioned element anchors to anchor named --anchor. Initially, only #anchor-1 has that anchor name, so the anchor-positioned element should anchor to #anchor-1. After change(), both #anchor-1 and #anchor-2 has that anchor name. Because #anchor-2 is later in tree order, #anchor-2 wins out, and the anchor-positioned element should anchor to #anchor-2. This is the behavior in Chrome, but in Safari, the anchor-positioned element still anchors to #anchor-1
Kiet Ho
Comment 4 2025-06-11 20:08:55 PDT
Antti Koivisto
Comment 5 2025-06-12 08:07:32 PDT
EWS
Comment 6 2025-06-13 01:27:55 PDT
Committed 296184@main (16977f92e64a): <https://commits.webkit.org/296184@main> Reviewed commits have been landed. Closing PR #46661 and removing active labels.
Antti Koivisto
Comment 7 2025-06-13 01:47:52 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/53120
Note You need to log in before you can comment on or make changes to this bug.