Title: [145434] branches/chromium/1410/Source/WebCore/css/RuleSet.h
Revision
145434
Author
wangxian...@chromium.org
Date
2013-03-11 16:54:01 -0700 (Mon, 11 Mar 2013)

Log Message

Merge 145034 "Make RuleData support up to 8191 selectors"

> Make RuleData support up to 8191 selectors
> https://bugs.webkit.org/show_bug.cgi?id=111663
> 
> Patch by Philippe Liard <pli...@chromium.org> on 2013-03-06
> Reviewed by Andreas Kling.
> 
> r125294 made RuleData consume less memory by replacing a pointer with
> an index encoded on 12 bits.
> This unfortunately breaks Chrome for Android (and others) when a lot of
> CSS is used or more precisely when selectorIndex cannot be stored on 12
> bits.
> 
> Threfore this change decreases the number of bits used to store
> m_position by 1 (from 19 to 18) and adds this extra bit to
> m_selectorIndex so that values up to 8191 can be stored safely without
> overflowing.
> 
> * css/RuleSet.h:
> (RuleData):

TBR=commit-qu...@webkit.org
Review URL: https://codereview.chromium.org/12755018

Modified Paths

Diff

Modified: branches/chromium/1410/Source/WebCore/css/RuleSet.h (145433 => 145434)


--- branches/chromium/1410/Source/WebCore/css/RuleSet.h	2013-03-11 23:48:37 UTC (rev 145433)
+++ branches/chromium/1410/Source/WebCore/css/RuleSet.h	2013-03-11 23:54:01 UTC (rev 145434)
@@ -78,10 +78,10 @@
 
 private:
     StyleRule* m_rule;
-    unsigned m_selectorIndex : 12;
+    unsigned m_selectorIndex : 13;
     // This number was picked fairly arbitrarily. We can probably lower it if we need to.
     // Some simple testing showed <100,000 RuleData's on large sites.
-    unsigned m_position : 19;
+    unsigned m_position : 18;
     unsigned m_hasFastCheckableSelector : 1;
     unsigned m_specificity : 24;
     unsigned m_hasMultipartSelector : 1;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to