Closed
Bug 1934914
Opened 1 year ago
Closed 5 months ago
On CSSScopeRule with `:scope` selector, CSSScopeRule#selectorMatchesElement(0, scopedElement) returns false
Categories
(DevTools :: Inspector: Rules, defect, P2)
DevTools
Inspector: Rules
Tracking
(firefox143 fixed)
RESOLVED
FIXED
143 Branch
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: dshin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [at-scope-m2])
Attachments
(3 files)
With the following HTML:
<footer id="scoped">
<style>
@scope {
:scope {
color: red;
}
}
</style>
</footer>
executing scopedRule.selectorMatchesElement(0, document.querySelector("#scoped")) returns false.
I'm expecting it to return true as the rule does apply on the #scoped element.
| Reporter | ||
Comment 1•1 year ago
|
||
| Reporter | ||
Comment 2•1 year ago
|
||
I attached a patch which adds a failing assertion to demonstrate the issue.
David, would you know what's happening here?
Flags: needinfo?(dshin)
| Assignee | ||
Comment 3•1 year ago
|
||
Right, need to handle this. Somewhere here we need to collect scoped rules as well as parent style rules, as well as ensuring that we're in scope.
Updated•8 months ago
|
Severity: -- → S3
Priority: -- → P2
| Assignee | ||
Comment 4•5 months ago
|
||
Updated•5 months ago
|
Assignee: nobody → dshin
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•5 months ago
|
||
Pushed by dshin@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/20d9dd96cb8d
https://hg.mozilla.org/integration/autoland/rev/18192a2c7e42
Remove unused `stylist` param in `scope_condition_matches`. r=firefox-style-system-reviewers,emilio
https://github.com/mozilla-firefox/firefox/commit/5fd9ce062a67
https://hg.mozilla.org/integration/autoland/rev/2954a81e7a0b
Support @scope in CSSScopeRule#selectorMatchesElement. r=firefox-style-system-reviewers,devtools-reviewers,nchevobbe,emilio
Comment 7•5 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/18192a2c7e42
https://hg.mozilla.org/mozilla-central/rev/2954a81e7a0b
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
status-firefox143:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
| Assignee | ||
Updated•5 months ago
|
Whiteboard: [at-scope-triage]
Updated•5 months ago
|
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in
before you can comment on or make changes to this bug.
Description
•