github web-platform-tests/wpt merge_pr_46929

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
14 months ago

Fix various issues with :nth-child(... of S) invalidation.

There were multiple issues here:

  • If whole subtree invalidation was performed, we had an early-exit
    and would forget to do nth-sibling invalidation.

  • When merging two feature sets, we would forget to copy the
    nth-sibling bit.

  • Perhaps most dangerously, we could try to set the nth-sibling
    bit on the singleton self-invalidation set. This would actually
    work pretty well, until we tried to extend the set due to some
    other reason, where we would observe that what we tried to clone
    was the singleton, and have an early-exit (not copying the
    nth-sibling bit). We fix that by never returning the singleton
    set if we intend to set the nth-sibling bit on it, and also
    add a DCHECK to ensure this doesn't happen again.

Also, add the nth-sibling bit to the printed bits in ToString(),
for easier debuggability.

Fixed: 333420613
Change-Id: I8792481a5db028da46a674648d74618802f75dc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5660420
Commit-Queue: Steinar H Gunderson sesse@chromium.org
Reviewed-by: Rune Lillesveen futhark@chromium.org
Cr-Commit-Position: refs/heads/main@{#1320867}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.