[webkit-reviews] review denied: [Bug 16002] Load SVG (and other) UA StyleSheets dynamically when needed : [Attachment 17645] First attempt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 2 08:59:50 PST 2007


Darin Adler <darin at apple.com> has denied Rob Buis <rwlbuis at gmail.com>'s request
for review:
Bug 16002: Load SVG (and other) UA StyleSheets dynamically when needed
http://bugs.webkit.org/show_bug.cgi?id=16002

Attachment 17645: First attempt
http://bugs.webkit.org/attachment.cgi?id=17645&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
+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


More information about the webkit-reviews mailing list