Chromium Code Reviews

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

Issue 2785103004: Added available bit to m_selectorIndex. (Closed)
Patch Set: Corrected expectation. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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...)
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),
125 m_position(position), 124 m_position(position),
126 m_specificity(selector().specificity()), 125 m_specificity(selector().specificity()),
127 m_containsUncommonAttributeSelector( 126 m_containsUncommonAttributeSelector(
128 blink::containsUncommonAttributeSelector(selector())), 127 blink::containsUncommonAttributeSelector(selector())),
129 m_linkMatchType(selector().computeLinkMatchType()), 128 m_linkMatchType(selector().computeLinkMatchType()),
130 m_hasDocumentSecurityOrigin(addRuleFlags & RuleHasDocumentSecurityOrigin), 129 m_hasDocumentSecurityOrigin(addRuleFlags & RuleHasDocumentSecurityOrigin),
131 m_propertyWhitelist( 130 m_propertyWhitelist(
132 determinePropertyWhitelistType(addRuleFlags, selector())), 131 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 283 matching lines...)
426 } 426 }
427 427
428 #ifndef NDEBUG 428 #ifndef NDEBUG
429 void RuleSet::show() const { 429 void RuleSet::show() const {
430 for (const auto& rule : m_allRules) 430 for (const auto& rule : m_allRules)
431 rule.selector().show(); 431 rule.selector().show();
432 } 432 }
433 #endif 433 #endif
434 434
435 } // namespace blink 435 } // namespace blink
OLDNEW

Powered by Google App Engine