Empty warning for selector `:scope ~ *` (SiblingCombinatorAfterScope warning)
Categories
(DevTools :: Inspector: Rules, defect)
Tracking
(firefox-esr140 unaffected, firefox146 wontfix, firefox147 wontfix, firefox148 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox146 | --- | wontfix |
| firefox147 | --- | wontfix |
| firefox148 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Steps to reproduce
- Open the attached test case
- Open the inspector
- Inspect the
<h1>element - Hover the warning icon in the selector
Actual results
The warning is empty
In the browser console, we can see the following error:
10:29:05.301 Unknown selector warning kind
Array [ "SiblingCombinatorAfterScope" ]
css-selector-warnings-tooltip-helper.js:45:17
That's coming from https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/devtools/client/shared/widgets/tooltip/css-selector-warnings-tooltip-helper.js#34,44-45
#getTemplate(data, tooltip) {
...
if (!SELECTOR_WARNINGS[selectorWarningKind]) {
console.error("Unknown selector warning kind", data);
and indeed we don't have a SiblingCombinatorAfterScope warning in https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/devtools/client/shared/widgets/tooltip/css-selector-warnings-tooltip-helper.js#9-15
const SELECTOR_WARNINGS = {
UnconstrainedHas: {
l10nId: "css-selector-warning-unconstrained-has",
// There could be a specific section on the MDN :has page for this: https://github.com/mdn/mdn/issues/469
learnMoreUrl: null,
},
};
The warning was added on the platform side in Bug 1882379
| Assignee | ||
Comment 1•5 days ago
|
||
David, maybe we could add a comment on top of https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/layout/style/CSSStyleRule.cpp#359-366
SelectorWarningKind ToWebIDLSelectorWarningKind(
StyleSelectorWarningKind aKind) {
switch (aKind) {
case StyleSelectorWarningKind::UnconstraintedRelativeSelector:
return SelectorWarningKind::UnconstrainedHas;
case StyleSelectorWarningKind::SiblingCombinatorAfterScopeSelector:
return SelectorWarningKind::SiblingCombinatorAfterScope;
}
to indicate a bug should be filed for devtools/an entry should be added in https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/devtools/client/shared/widgets/tooltip/css-selector-warnings-tooltip-helper.js
| Assignee | ||
Comment 2•5 days ago
|
||
Updated•5 days ago
|
Comment 3•4 days ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #1)
David, maybe we could add a comment on top of https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/layout/style/CSSStyleRule.cpp#359-366
SelectorWarningKind ToWebIDLSelectorWarningKind( StyleSelectorWarningKind aKind) { switch (aKind) { case StyleSelectorWarningKind::UnconstraintedRelativeSelector: return SelectorWarningKind::UnconstrainedHas; case StyleSelectorWarningKind::SiblingCombinatorAfterScopeSelector: return SelectorWarningKind::SiblingCombinatorAfterScope; }to indicate a bug should be filed for devtools/an entry should be added in https://searchfox.org/firefox-main/rev/e7114bcf28158b46e516178c06201e4849201eba/devtools/client/shared/widgets/tooltip/css-selector-warnings-tooltip-helper.js
Ahh.. My bad, and good idea. Bug 2005744 filed
Comment 4•4 days ago
|
||
Set release status flags based on info from the regressing bug 1882379
Updated•2 days ago
|
Comment 6•19 hours ago
|
||
| bugherder | ||
Updated•16 hours ago
|
Description
•