Bug 310398
| Summary: | [css-anchor-position-1] Accommodate pseudo-elements when sorting anchor elements by tree order | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kiet Ho <kiet.ho> |
| Component: | Layout and Rendering | Assignee: | Kiet Ho <kiet.ho> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, kiet.ho, maikelkrause, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Kiet Ho
[css-anchor-position-1] Accommodate pseudo-elements when sorting anchor elements by tree order
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/173032203>
maikelkrause
Relevant test: https://codepen.io/maikelkrause/pen/raMOVNN?editors=1100
The second (purple) chain uses `::after` pseudo-elements anchored to one another.
Kiet Ho
If there are multiple matching anchors with the same, the spec says we should sort them by tree order and take the last one.
The bug is that the current sorting code can't figure out which pseudo-element is before another pseudo element. So if you have a chain like 1 <- 2 <- 3, and they both have the same anchor name, it's possible for 3 to chain to 1 or 2.
The behavior is sorta non-deterministic, so it's possible for 3 to chain to 2 sometimes and to 1 some other times.