Bug 295011
| Summary: | [css-anchor-position-1] position-visibility:anchors-visible does not work correctly for chained anchors | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | fantasai <fantasai.bugs> |
| Component: | Layout and Rendering | Assignee: | Antti Koivisto <koivisto> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bfulgham, kiet.ho, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 289743, 291856 | ||
fantasai
Overview:
We have some errors in how we invalidate for position-visibility, in response to dynamic changes and/or chained anchor relationships.
Affected Tests:
* https://wpt.live/css/css-anchor-position/position-visibility-anchors-visible-chained-001.html
* https://wpt.live/css/css-anchor-position/position-visibility-anchors-visible-chained-002.html
* https://wpt.live/css/css-anchor-position/position-visibility-anchors-visible-chained-003.html
* https://wpt.live/css/css-anchor-position/position-visibility-anchors-visible-chained-004html
* http://wpt.live/css/css-anchor-position/position-visibility-anchors-visible-change-anchor.html
Specification Link:
https://www.w3.org/TR/css-anchor-position/#position-visibility
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/154354453>
Kiet Ho
Take position-visibility-anchors-visible-chained-001.html for example, the DOM tree looks like this:
-- #scroll-container
|-- #anchor1 (anchor named --a1)
|-- #chained (anchorpos to --a1)
|-- #anchor2 (anchor named --a2)
|-- #target (anchorpos to --a2)
So the anchor chain is
#target -> #anchor2 which is child of #chained -> #anchor1
297286@main implements chained scroll adjustment but only when the element is both an anchor and anchorpos. In the above case, the anchor is children of anchorpos, so that change doesn't adjust scroll.
Antti Koivisto
Pull request: https://github.com/WebKit/WebKit/pull/49529
EWS
Committed 298835@main (ed2498e01831): <https://commits.webkit.org/298835@main>
Reviewed commits have been landed. Closing PR #49529 and removing active labels.