Closed Bug 1815241 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 38369 - Fix incorrect :nth-child(... of S) with many children.

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 38369 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/38369
Details from upstream follow.

Steinar H. Gunderson <sesse@chromium.org> wrote:

Fix incorrect :nth-child(... of S) with many children.

When servicing :nth-child(... of S) from the cache (which happens with
more than 32 elements), we only store every third element in the cache,
but when looking up and not hitting an element exactly, we would not
properly skip siblings that don't match the selector.

Add a DCHECK to make sure we catch this earlier if similar issues
should show up in the future.

Fixed: 1412421
Change-Id: Id97d110e552760882ad0558e14980467f1017220

Reviewed-on: https://chromium-review.googlesource.com/4224392
WPT-Export-Revision: ec2a2fd006865f8c8a70c743acb28b587ecfb3b6

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/94562e23984f [wpt PR 38369] - Fix incorrect :nth-child(... of S) with many children., a=testonly
Test result changes from PR not available.
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.