SVG should not munge ua.css at build time

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: bz, Assigned: tor)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Right now, if SVG is enabled we end up munging ua.css as we build.  This causes
the issues mentioned in bug 266930, at least.

Worse, it means that svg.css is loaded at all times, which means it participates
in style resolution for all pages.  I'm not so convinced we want the performance
hit on HTML pages just from turning on SVG at build time.

What SVG _should_ be doing is the same thing as what MathML does -- dynamically
adding the SVG sheet to the "catalog sheets" as needed....
(Assignee)

Comment 1

13 years ago
Created attachment 178492 [details] [diff] [review]
switch to catalog style sheet
(Assignee)

Updated

13 years ago
Attachment #178492 - Flags: review?(bzbarsky)
Comment on attachment 178492 [details] [diff] [review]
switch to catalog style sheet

>Index: content/base/src/nsDocument.cpp
>+nsDocument::EnsureCatalogStyleSheet(const char *aStyleSheetURI)
>+  if (cssLoader && NS_SUCCEEDED(cssLoader->GetEnabled(&enabled)) && enabled) {
...
>+  }

I think you want to close out this if _much_ later.  As things stand, if
cssLoader is null or disabled, you'll load the sheet...
Attachment #178492 - Flags: review?(bzbarsky) → review-
(Assignee)

Comment 3

13 years ago
Created attachment 178541 [details] [diff] [review]
fix nesting
Assignee: general → tor
Attachment #178492 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #178541 - Flags: review?(bzbarsky)
Comment on attachment 178541 [details] [diff] [review]
fix nesting

r+sr=bzbarsky
Attachment #178541 - Flags: superreview+
Attachment #178541 - Flags: review?(bzbarsky)
Attachment #178541 - Flags: review+
(Assignee)

Comment 5

13 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Shouldn't you cvs remove layout/svg/base/src/install-svg-css.pl as well? 
(sr=dbaron on that if you want it)
(Assignee)

Comment 7

13 years ago
install-svg-css.pl removed.
shouldn't nsIDocument get a new IID?
Erm..... yes, it should.  tor, could you please rev the iid?
(Assignee)

Comment 10

13 years ago
Updated iid.
You need to log in before you can comment on or make changes to this bug.