Title: [117084] trunk/Source/WebCore
- Revision
- 117084
- Author
- [email protected]
- Date
- 2012-05-15 09:34:20 -0700 (Tue, 15 May 2012)
Log Message
RuleSet::addToRuleSet wastes a bit of Vector capacity.
<http://webkit.org/b/86434>
Reviewed by Antti Koivisto.
Have makeRuleSet call shrinkToFit() on the vectors before returning them.
This avoids wasting space for the rulesets constructed in collectFeatures().
* css/StyleResolver.cpp:
(WebCore::makeRuleSet):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (117083 => 117084)
--- trunk/Source/WebCore/ChangeLog 2012-05-15 16:22:54 UTC (rev 117083)
+++ trunk/Source/WebCore/ChangeLog 2012-05-15 16:34:20 UTC (rev 117084)
@@ -1,3 +1,16 @@
+2012-05-15 Andreas Kling <[email protected]>
+
+ RuleSet::addToRuleSet wastes a bit of Vector capacity.
+ <http://webkit.org/b/86434>
+
+ Reviewed by Antti Koivisto.
+
+ Have makeRuleSet call shrinkToFit() on the vectors before returning them.
+ This avoids wasting space for the rulesets constructed in collectFeatures().
+
+ * css/StyleResolver.cpp:
+ (WebCore::makeRuleSet):
+
2012-05-15 Darin Adler <[email protected]>
[CG] CGImageCreateWithImageInRect is too slow, but for now we still need to use it
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (117083 => 117084)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2012-05-15 16:22:54 UTC (rev 117083)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-05-15 16:34:20 UTC (rev 117084)
@@ -460,6 +460,7 @@
OwnPtr<RuleSet> ruleSet = RuleSet::create();
for (size_t i = 0; i < size; ++i)
ruleSet->addRule(rules[i].rule, rules[i].selector, rules[i].hasDocumentSecurityOrigin, false);
+ ruleSet->shrinkToFit();
return ruleSet.release();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes