Closed Bug 1809754 Opened 2 years ago Closed 1 year ago

Invalidation for nth-child(An+B of selector list), nth-last-child(An+B of selector list)

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: zrhoffman, Unassigned)

References

Details

Once matching is supported in bug 1808228, the invalidation reftests in bug 1809470 will still fail (though the invalidation test added in bug 1809659 passes), so it should be addressed before enabling layout.css.nth-child-of.enabled by default in bug1808229.

Component::NthOf should be added to collect_ancestor_hashes(), maybe_allowed_after_pseudo_element(), matches_for_stateless_pseudo_element(), and specific_bucket_for() like Component::Is and Component::Where are, which perhaps gets us closer to working :nth-{,last-}child invalidation but not quite there.

Once matching is supported in bug 1808228, the invalidation reftests in bug 1809470 will still fail (though the invalidation test added in bug 1809659 passes), so it should be addressed before enabling layout.css.nth-child-of.enabled by default in bug1808229.

My mistake, the invalidation test added in bug 1809659 fails, too (as well as the ones from bug 1809402).

Blocks: 1809402, 1809659
Depends on: 1810657
No longer blocks: 1809470, 1809659
Depends on: 1818135
Depends on: 1818151
Depends on: 1818152
Depends on: 1818153
Depends on: 1818154
Depends on: 1818155
Depends on: 1836563

:nth-child(An+B of <selector list>) and :nth-last-child(An+B of <selector list>) invalidation WPTs pass! Note that a @scope (:nth-child(An+B of <selector list>)) WPT exists and fails fails:

https://wpt.fyi/results/css/css-cascade/scope-invalidation.html

but that is expected since @scope has yet to be implemented (bug 1830512).

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.