[Webkit-unassigned] [Bug 16002] Load SVG (and other) UA StyleSheets dynamically when needed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Dec 2 08:59:51 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=16002
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #17645|review? |review-
Flag| |
------- Comment #2 from darin at apple.com 2007-12-02 08:59 PDT -------
(From update of attachment 17645)
+static const MediaQueryEvaluator screenEval("screen");
+static const MediaQueryEvaluator printEval("print");
We can't have global objects with constructors like these in WebKit -- causes a
performance problem, especially on Mac OS X. You can instead put create
functions that return the objects.
+#if ENABLE(SVG)
+ if (e->isSVGElement() && !svgSheet) {
+ // SVG rules.
+ svgSheet = parseUASheet(svgUserAgentStyleSheet);
+ defaultStyle->addRulesFromSheet(svgSheet, &screenEval);
+ defaultPrintStyle->addRulesFromSheet(svgSheet, &printEval);
+ }
+#endif
int firstUARule = -1, lastUARule = -1;
I think you need a blank line after the #endif
review- because of the global initializers
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list