Open Bug 1011802 Opened 10 years ago Updated 2 years ago

Avoid loading the html.css UA style sheet when possible

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

(Whiteboard: [MemShrink:P2])

Attachments

(1 file)

We should avoid loading the html.css UA style sheet when possible. Currently we load it for _all_ documents because ua.css (which is loaded for all documents) @import's it. This means that we load it for XUL documents, SVG documents, SVG-as-an-image, etc.
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → jwatt
Status: NEW → ASSIGNED
(In reply to Jonathan Watt [:jwatt] from comment #0)
> We should avoid loading the html.css UA style sheet when possible. Currently
> we load it for _all_ documents because ua.css (which is loaded for all
> documents) @import's it. This means that we load it for XUL documents, SVG
> documents, SVG-as-an-image, etc.

But these other types of documents can all include elements in the HTML namespace, and often do.  So I don't think we can do this.
The patch (yet to be worked through Try) loads html.css on demand in nsGenericHTMLElement::BindToTree. Try will hopefully give me a better idea of how common it is for XUL to include HTML elements. If it's common it may be better to load html.css up front for XUL too. I don't think it's common enough for SVG documents.
No longer blocks: 999931
No longer blocks: 686875
Depends on: 1013936
Blocks: 1011806
No longer blocks: 1011806

heycam, the reworking you did of UA style sheet loading means that loading html.css etc. into SVG-as-an-image is a non-issue, right? (It's all shared.)

Flags: needinfo?(cam)

Right, as part of those changes we won't do any lazy loading of sheets any more. Just waiting on bug 1533569 to land.

Flags: needinfo?(cam)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: