Closed Bug 1980210 Opened 4 months ago Closed 3 months ago

Chrome-Only `CSSStyleRule#querySelectorAll` doesn't support `@scope`

Categories

(DevTools :: Inspector: Rules, defect, P3)

defect
Points:
1

Tracking

(firefox144 fixed)

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: dshin, Assigned: dshin)

References

Details

(Whiteboard: [at-scope-m2])

Attachments

(2 files)

Used here. Uses element.querySelectorAll() behind the scenes.

Similar to CSSScopeRule#selectorMatchesElement, tracked in bug 1934914.
Use of querySelectorAll doesn't make sense if there's a scope rule along the parent chain (querySelectorAll dodges this issue because the selectors are supplied as string, which cannot be encased in a scope rule).

This affects the little square button inside inspector's "This Element" panel where it highlights all matching elements.

STR:

  1. Load attached testcase
  2. Inspect the green box
  3. Note that it is green because it matches the scope rule, whereas the red one doesn't.
  4. Click on the square beside the scoped rule ("Highlight all elements matching this selector")

Expected: Only the green box is highlighted
Actual: Both green and red boxes are highlighted

Severity: -- → S3
Priority: -- → P3
Whiteboard: [at-scope-triage]
Assignee: nobody → dshin
Status: NEW → ASSIGNED
Pushed by dshin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ddb7b52487f1 https://hg.mozilla.org/integration/autoland/rev/099f2e619500 Support @scope in ChromeOnly CSSStyleRule.querySelectorAll. r=firefox-style-system-reviewers,devtools-reviewers,layout-reviewers,emilio,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
Points: --- → 1
Whiteboard: [at-scope-triage] → [at-scope-m2]
QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: