Dynamic changes due to rules in user sheets don't get applied in Shadow DOM
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: omdn, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.42 Safari/537.36
Steps to reproduce:
Using the add-on attached to this issue, I'm attempting to style Shadow DOM contents with CSS inserted by the add-on (with a cssOrigin
of user
). The styles are applied on initial load as expected, but aren't being applied when the Shadow DOM content changes.
STR:
- Load the attached add-on into Firefox.
- Navigate to any web page. A red box should appear in the top left corner.
- Click the "Toggle blue background" button.
Actual results:
The box's background color doesn't change even though its class changes to "blue" and CSS to change the background color has been inserted by the add-on.
Expected results:
The box's background color should have changed from red to blue as defined by the "blue" class being toggled and the associated CSS inserted by the add-on.
I have tested the attached add-on in Chrome and Opera and the background changes to blue as expected when clicking the "Toggle blue background" button.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
I haven't looked at the add-on, but if we don't take dynamic changes into account that seems like a bug. Per the specification add-ons are kinda out-of-scope.
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
So this is because it's a user stylesheet... It's not 100% clear to me how Shadow DOM and user sheets interact, but right now we're handling it inconsistently.
I've attached an automated test that reproduces the issue, though I haven't investigated the root cause of the bug yet.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Ok, back now, the bug was so silly that it's embarrassing, whoops :)
Updated•5 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/19e21bdb79cb Account for user stylesheets for Shadow DOM invalidation. r=jwatt
Comment 8•5 years ago
|
||
bugherder |
Comment 9•5 years ago
|
||
bugherder uplift |
Description
•