Don't do duplicate work on style elements from the innerHTML setter.
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(3 files)
Assignee | ||
Comment 1•11 months ago
|
||
Right now, when binding to the tree we queue a runnable to update the
stylesheet, even though mEnableUpdates is false.
Even though the redundant update is nowadays always cached, it's just
wasted work, and the code is simpler without it.
This will be tested by bug 1771113, which is what made me look at this.
We need to tweak a bit the dispatch of applicable state change events
for DevTools, because for a case like:
div.attachShadow({ mode: "open" }).innerHTML = <style>...</style>
;
Before we'd go through the stylesheet cache here due to the redundant
update:
But now we won't, and the code in StyleSheet.cpp wasn't quite correct /
didn't dispatch the event.
Nobody listens to style-sheet-applicable-state-changed, so remove that
code while at it.
Assignee | ||
Comment 2•11 months ago
|
||
Couldn't resist.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9333c1c9a5e7 Don't do duplicate work on style elements from the innerHTML setter. r=smaug
Assignee | ||
Comment 4•11 months ago
|
||
Remove useless namespacing, we have an using statement in the file
anyways.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8444a955cd4a Clean-up nsHtml5TreeOperation::CreateHTMLElement. r=smaug
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c085100a9a96 Other misc nsHtml5TreeOperation clean-ups. r=smaug
Comment 7•11 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9333c1c9a5e7
https://hg.mozilla.org/mozilla-central/rev/8444a955cd4a
https://hg.mozilla.org/mozilla-central/rev/c085100a9a96
Description
•