sibling-count() interacts poorly with cached properties sharing
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: dshin, Assigned: dshin)
References
Details
Attachments
(1 file, 1 external file)
|
443 bytes,
text/html
|
Details |
(Original testcase from https://codepen.io/editor/alowpoly/pen/01a207e3-387b-74f5-aeb7-4668bae6b3d9)
Fairly sure this is a style sharing issue, because they style fine if there's only one <ul>, and the issue flips if the ordering is changed.
| Assignee | ||
Comment 1•5 days ago
•
|
||
Hm, actually, these checks exist. Digging a bit further
| Assignee | ||
Comment 3•5 days ago
•
|
||
Yeah, adding something like this
if style.flags.contains(ComputedValueFlags::USES_SIBLING_COUNT) {
return false;
}
around here makes it work as expected.
... This optimization shares non-inherited properties from the matching rule node, but I wonder about some of these. Sibling-using functions likely shouldn't be shared, but could, say, random() end up being the same value when used on non-inherited property?
EDIT: Ah, they set the rule cache condition as uncachable 1 2
| Assignee | ||
Updated•5 days ago
|
| Assignee | ||
Updated•5 days ago
|
| Assignee | ||
Comment 4•5 days ago
|
||
Comment 6•3 days ago
|
||
| bugherder | ||
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/65814 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Description
•