Title: [102479] trunk/Source/WebCore
Revision
102479
Author
t...@chromium.org
Date
2011-12-09 15:23:23 -0800 (Fri, 09 Dec 2011)

Log Message

REGRESSION(102234): 2-3% layout regression
https://bugs.webkit.org/show_bug.cgi?id=74141

Reviewed by David Hyatt.

Don't allocate a RuleSet when there are no regions.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForRegionStyling):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (102478 => 102479)


--- trunk/Source/WebCore/ChangeLog	2011-12-09 23:21:10 UTC (rev 102478)
+++ trunk/Source/WebCore/ChangeLog	2011-12-09 23:23:23 UTC (rev 102479)
@@ -1,3 +1,15 @@
+2011-12-09  Tony Chang  <t...@chromium.org>
+
+        REGRESSION(102234): 2-3% layout regression
+        https://bugs.webkit.org/show_bug.cgi?id=74141
+
+        Reviewed by David Hyatt.
+
+        Don't allocate a RuleSet when there are no regions.
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::initForRegionStyling):
+
 2011-12-09  Anders Carlsson  <ander...@apple.com>
 
         Fix assertion failure in ScrollAnimatorMac

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (102478 => 102479)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2011-12-09 23:21:10 UTC (rev 102478)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2011-12-09 23:23:23 UTC (rev 102479)
@@ -859,13 +859,14 @@
 void CSSStyleSelector::initForRegionStyling(RenderRegion* region)
 {
     setRegionForStyling(region);
+
+    if (!region)
+        return;
+
     // Mark that the set of rules comes from region styling since we need to filter
     // the properties that can be applied.
     m_regionRules = adoptPtr(new RuleSet(true));
 
-    if (!region)
-        return;
-
     // From all the region style rules, select those that apply to the specified region.
     for (Vector<RefPtr<WebKitCSSRegionRule> >::iterator it = m_regionStyleRules.begin(); it != m_regionStyleRules.end(); ++it) {
         const CSSSelectorList& regionSelectorList = (*it)->selectorList();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to