Closed Bug 2095232 Opened 10 days ago Closed 8 days ago

[wpt-sync] Sync PR 65030 - fix(blink): avoid unrelated sibling scans in SelectorQuery

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

imagebuilder1837 <imagebuilder1837@outlook.com> wrote:

fix(blink): avoid unrelated sibling scans in SelectorQuery

Restrict external sibling prescans to the current compound level and
skip subject-level prescans, since the subject and its siblings must be
inside the query subtree. This avoids scanning unrelated preceding
siblings while preserving external ancestor and sibling matching
semantics.

Add operation-count regression tests for child-only queries and subject
sibling chains, plus WPT coverage for query-root matching boundaries.
Add the first-time contributor to AUTHORS.

Bug: 577162419
Test: out/Selector/blink_unittests --gtest_filter=SelectorQueryTest.*
Test: WPT dom/nodes/ParentNode-querySelector-external-siblings.html
Change-Id: I3d8a7277895905eeca5a642c98c9226c443f5686
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8734382
Reviewed-by: Helmut Januschka \<helmut@januschka.com>
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1742330}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 4 subtests

Status Summary

Firefox

OK : 1
PASS: 4

Chrome

OK : 1
PASS: 4

Safari

OK : 1
PASS: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9fb90f475882 https://hg.mozilla.org/integration/autoland/rev/2bb6e93181e4 [wpt PR 65030] - fix(blink): avoid unrelated sibling scans in SelectorQuery, a=testonly
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.