[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

Attachment 17645: First attempt

------- 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 (e->isSVGElement() && !svgSheet) {
+	 // SVG rules.
+	 svgSheet = parseUASheet(svgUserAgentStyleSheet);
+	 defaultStyle->addRulesFromSheet(svgSheet, &screenEval);
+	 defaultPrintStyle->addRulesFromSheet(svgSheet, &printEval);
+    }
     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