[computed panel] nested media query declaration isn't displayed in matched selector section
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(firefox149 fixed)
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
Details
Attachments
(2 files)
Steps to reproduce
- Open attached test case
- Open inspector
- Select the
<body>element - Select Computed panel
- Expand
background-coloritem
Expected results
In the matched selector list, I can see the hotpink declaration (in a media query) that is actually applied
Actual results
The only declaration we see is the gold declaration, which isn't applied
| Assignee | ||
Comment 1•2 months ago
|
||
Note that this is related to nesting as with the following CSS, we do see the 2 declarations displayed:
body {
background-color: gold;
}
@media (width > 1px) {
body {
background-color: hotpink;
}
}
| Assignee | ||
Comment 2•2 months ago
|
||
Here's the pushlog I got running mozregression: https://hg-edge.mozilla.org/mozilla-central/pushloghtml?fromchange=4174af79b987e65ed5307914be08d49a52353d70&tochange=b5de9d1c08200a7aba6845c319513e6cfc57e0a3
My guess is on Bug 1918408
| Assignee | ||
Comment 3•2 months ago
|
||
We fails short in https://searchfox.org/firefox-main/rev/69888f58354c8d44e854945761a9e8fa954512d1/devtools/server/actors/inspector/css-logic.js#1143,1148-1149,1151-1153
get selectors() {
...
// Parse the CSSStyleRule.selectorText string.
this.#selectors = [];
...
if (!this.domRule.selectorText) {
return this.#selectors;
}
as CSSNestedDeclarations doesn't have a selectorText property, so we just return an empty array, which makes the rule being ignored later down the road.
| Assignee | ||
Comment 4•2 months ago
|
||
Updated•2 months ago
|
Updated•2 months ago
|
Updated•1 month ago
|
Description
•