**Steps to reproduce**
1. Open the attached page
2. Inspect the "nested shadow dom section" element
3. Hover the `--a` variable in the `section { color: var(--a); }` rule
**Expected results**
The popup indicates that `--a` is `red`
**Actual results**
The popup says that `--a` is not defined
---
This is caused by `CSSStyleRule::selectorMatchesElement` not property working for the `:host` rule on the nested shadow host for the shared stylesheet.
I'll push a patch adding a test that demonstrates the issue.
`CSSStyleRule::selectorMatchesElement` was fixed to handle `:host` in Bug 1836755 , but I guess we missed this specific case
Bug 1995943 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
**Steps to reproduce**
1. Open the attached page
2. Inspect the "nested shadow dom section" element
3. Hover the `--a` variable in the `section { color: var(--a); }` rule
**Expected results**
The popup indicates that `--a` is `red`
**Actual results**
The popup says that `--a` is not defined
---
This is caused by `CSSStyleRule::selectorMatchesElement` not property working for the `:host` rule on the nested shadow host for the shared stylesheet.
[D269727](https://phabricator.services.mozilla.com/D269727) highlights the issue.
`CSSStyleRule::selectorMatchesElement` was fixed to handle `:host` in Bug 1836755 , but I guess we missed this specific case