Inherited properties from ::details-content pseudo element are not displayed in the computed panel
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(firefox139 fixed)
| Tracking | Status | |
|---|---|---|
| firefox139 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
- Set
layout.css.details-content.enabled to true - Navigate to
data:text/html,<meta charset=utf8><style>details::details-content {color: tomato;}</style><details open><summary>Example summary</summary><p>First paragraph.</p><p>Second paragraph</p></details> - Open the inspector
- Select one of the p element inside the
<details>node - Open the computed panel
- Expand the
colorproperty
Expected result: the ::details-content rule should be displayed
Actual result: it's not
I have a WIP patch for Bug 1953807 where I'm displaying inherited declarations from ::details-content rules, but it's not enough.
In https://searchfox.org/mozilla-central/rev/19764d620c02025bdcc8d1f3c4fcf5a580407a01/devtools/server/actors/inspector/css-logic.js#480,483
selectorMatchesElement(domRule, idx) {
...
if (domRule.selectorMatchesElement(idx, element)) {
With domRule being the ::details-content, idx being 0, and element being the <slot> representing the ::details-content element, domRule.selectorMatchesElement returns false. It also returns false if element is <details>.
We probably need to make some tweaks to https://searchfox.org/mozilla-central/rev/19764d620c02025bdcc8d1f3c4fcf5a580407a01/layout/style/CSSStyleRule.cpp#254-297
| Assignee | ||
Comment 1•1 year ago
|
||
This allows to actually show inherited element backed pseudo element rules
(e.g. ::details-content) in the computed panel selector matches.
A test is added to cover this scenario.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•