`+` CSS selector in combination with :empty in shadow DOM only refreshes when opening inspector
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: ntim, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Testcase: https://nt1m.github.io/playground/shadow-dom-bug/
STR:
- Click the button
Expected result:
- "foo" and "bar" should be shown
Actual result:
- only "foo" is shown
If you open devtools, then you get the expected result
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
mozregression brought me at bug 1410578, but I'm looking if I can reproduce using <style> instead of <link rel="stylesheet"> so I can provide a more useful regression range.
Reporter | ||
Comment 2•5 years ago
|
||
I'm otherwise getting https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d3910b7628b8066d3f30d58b17b5824b05768854&tochange=515407ebfa1433c31144374313bbfd8b942af41
but before the regression range, I get this.attachShadow is undefined
so I guess it's not that useful either.
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
FWIW, opening devtools just causes .bar
to be restyled because devtools inject stylesheets in the page.
Comment 4•5 years ago
|
||
So the issue is that we hit the early return here, because the grand parent (the ShadowRoot) doesn't have the flags.
This is because of this code, which looks at parent_element
and maybe should look at parent node.
Wrapping .foo
and .bar
under another element works around the issue. This is pretty similar to bug 1480746. I want to fix all these in bug 1480477, though maybe I can fix them earlier / separately.
Comment 5•5 years ago
|
||
So the issue here is specific to :empty
, as far as I can tell.
Updated•2 years ago
|
Description
•