Don't allocate an AuthorStyles for the ShadowRoot of <svg:use>

RESOLVED FIXED in Firefox 63

Status

()

RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: bzbarsky, Assigned: emilio)

Tracking

(Blocks: 2 bugs)

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

It looks like we always allocate an AuthorStyles in the ShadowRoot constructor.  In the case of <svg:use>, we don't do anything with stylesheets in the shadow tree, so the AuthorStyles there is unused.

In fact, maybe we should consider allocating AuthorStyles lazily in general, for all the cases when shadow trees don't have styles inside them.
(Assignee)

Updated

4 months ago
Flags: needinfo?(emilio)
(Reporter)

Updated

4 months ago
Blocks: 1436250
(Assignee)

Updated

4 months ago
Blocks: 1484563
(Assignee)

Comment 1

4 months ago
Created attachment 9005065 [details]
Make the allocation of AuthorStyles for ShadowRoot lazy.

So that we don't waste a bunch of memory with stuff like <svg:use>. I
plan to shrink AuthorStyles further, but this should help regardless, and isn't
very complex.
(Assignee)

Updated

4 months ago
Assignee: nobody → emilio
Flags: needinfo?(emilio)
Comment on attachment 9005065 [details]
Make the allocation of AuthorStyles for ShadowRoot lazy.

Xidorn Quan [:xidorn] UTC+10 has approved the revision.
Attachment #9005065 - Flags: review+

Comment 3

4 months ago
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/94b793d95409
Make the allocation of AuthorStyles for ShadowRoot lazy. r=xidorn,firefox-style-system-reviewers

Comment 4

4 months ago
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/752786e0dd01
followup: Add a missing check. r=me

Comment 5

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/94b793d95409
https://hg.mozilla.org/mozilla-central/rev/752786e0dd01
Status: NEW → RESOLVED
Last Resolved: 4 months ago
status-firefox63: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.