Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(994)

Side by Side Diff: third_party/WebKit/Source/core/css/RuleSet.cpp

Issue 2797953002: Revert increased limit for m_selectorIndex. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 return PropertyWhitelistNone; 115 return PropertyWhitelistNone;
116 } 116 }
117 117
118 RuleData::RuleData(StyleRule* rule, 118 RuleData::RuleData(StyleRule* rule,
119 unsigned selectorIndex, 119 unsigned selectorIndex,
120 unsigned position, 120 unsigned position,
121 AddRuleFlags addRuleFlags) 121 AddRuleFlags addRuleFlags)
122 : m_rule(rule), 122 : m_rule(rule),
123 m_selectorIndex(selectorIndex), 123 m_selectorIndex(selectorIndex),
124 m_isLastInArray(false),
124 m_position(position), 125 m_position(position),
125 m_specificity(selector().specificity()), 126 m_specificity(selector().specificity()),
126 m_containsUncommonAttributeSelector( 127 m_containsUncommonAttributeSelector(
127 blink::containsUncommonAttributeSelector(selector())), 128 blink::containsUncommonAttributeSelector(selector())),
128 m_linkMatchType(selector().computeLinkMatchType()), 129 m_linkMatchType(selector().computeLinkMatchType()),
129 m_hasDocumentSecurityOrigin(addRuleFlags & RuleHasDocumentSecurityOrigin), 130 m_hasDocumentSecurityOrigin(addRuleFlags & RuleHasDocumentSecurityOrigin),
130 m_propertyWhitelist( 131 m_propertyWhitelist(
131 determinePropertyWhitelistType(addRuleFlags, selector())), 132 determinePropertyWhitelistType(addRuleFlags, selector())),
132 m_isLastInArray(false),
133 m_descendantSelectorIdentifierHashes() { 133 m_descendantSelectorIdentifierHashes() {
134 SelectorFilter::collectIdentifierHashes( 134 SelectorFilter::collectIdentifierHashes(
135 selector(), m_descendantSelectorIdentifierHashes, maximumIdentifierCount); 135 selector(), m_descendantSelectorIdentifierHashes, maximumIdentifierCount);
136 } 136 }
137 137
138 void RuleSet::addToRuleSet(const AtomicString& key, 138 void RuleSet::addToRuleSet(const AtomicString& key,
139 PendingRuleMap& map, 139 PendingRuleMap& map,
140 const RuleData& ruleData) { 140 const RuleData& ruleData) {
141 Member<HeapLinkedStack<RuleData>>& rules = 141 Member<HeapLinkedStack<RuleData>>& rules =
142 map.insert(key, nullptr).storedValue->value; 142 map.insert(key, nullptr).storedValue->value;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 427 }
428 428
429 #ifndef NDEBUG 429 #ifndef NDEBUG
430 void RuleSet::show() const { 430 void RuleSet::show() const {
431 for (const auto& rule : m_allRules) 431 for (const auto& rule : m_allRules)
432 rule.selector().show(); 432 rule.selector().show();
433 } 433 }
434 #endif 434 #endif
435 435
436 } // namespace blink 436 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleSet.h ('k') | third_party/WebKit/Source/core/css/RuleSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698