Bug 291260

Summary: [css-anchor-position-1] Subtree invisible when anchor-centered element visibility changes
Product: WebKit Reporter: Pawel Lampe <plampe>
Component: Layout and RenderingAssignee: Kiet Ho <kiet.ho>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, ian, kiet.ho, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 291856    
Attachments:
Description Flags
small demo to reproduce the issue none

Pawel Lampe
Reported 2025-04-08 03:11:59 PDT
Created attachment 474868 [details] small demo to reproduce the issue Given anchor positioning is used and anchor target uses 'anchor-canter' without using anchor() function for any insets, When anchor target visibility changes (it becomes visible after being invisible i.e. display:none changes to e.g. display:flow), Then the anchor target subtree is not rendered (no RenderObjects are created) and hence no anchor target children are visible. I did some digging and it actually is a regression that was introduced here: https://github.com/WebKit/WebKit/commit/aa6b7858fefa58b92a4ba4da1df0b837fb5cf1c6 (Antti Koivisto: [css-anchor-position-1] Trigger evaluation of default anchor when it's used for anchor-center (https://bugs.webkit.org/show_bug.cgi?id=283295)) Small test case attached. WPT test case is up for review: https://github.com/web-platform-tests/wpt/pull/51892
Attachments
small demo to reproduce the issue (750 bytes, text/html)
2025-04-08 03:11 PDT, Pawel Lampe
no flags
Radar WebKit Bug Importer
Comment 1 2025-04-08 11:01:31 PDT
Kiet Ho
Comment 2 2025-05-13 12:32:48 PDT
Confirmed dupe of 291065. *** This bug has been marked as a duplicate of bug 291065 ***
Note You need to log in before you can comment on or make changes to this bug.