Index: third_party/WebKit/Source/core/css/RuleSet.h |
diff --git a/third_party/WebKit/Source/core/css/RuleSet.h b/third_party/WebKit/Source/core/css/RuleSet.h |
index d8ad82f5ffeee46b824cabbe4bc426fdbc347b18..d6530ff771d2831e3fcdde1a5f064d171da59ed6 100644 |
--- a/third_party/WebKit/Source/core/css/RuleSet.h |
+++ b/third_party/WebKit/Source/core/css/RuleSet.h |
@@ -111,17 +111,23 @@ class CORE_EXPORT RuleData { |
private: |
Member<StyleRule> m_rule; |
- unsigned m_selectorIndex : 13; |
- // We store an array of RuleData objects in a primitive array. |
- unsigned m_isLastInArray : 1; |
+ // This number is picked fairly arbitrary. If lowered, be aware that there |
+ // might be sites and extensions using style rules with selector lists |
+ // exceeding the number of simple selectors to fit in this bitfield. |
+ // See https://crbug.com/312913 and https://crbug.com/704562 |
+ unsigned m_selectorIndex : 14; |
// 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 : 18; |
+ // 32 bits above |
unsigned m_specificity : 24; |
unsigned m_containsUncommonAttributeSelector : 1; |
unsigned m_linkMatchType : 2; // CSSSelector::LinkMatchMask |
unsigned m_hasDocumentSecurityOrigin : 1; |
unsigned m_propertyWhitelist : 2; |
+ // We store an array of RuleData objects in a primitive array. |
+ unsigned m_isLastInArray : 1; |
+ // 31 bits above |
// Use plain array instead of a Vector to minimize memory overhead. |
unsigned m_descendantSelectorIdentifierHashes[maximumIdentifierCount]; |
}; |