Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 r ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 , m_position(position) | 112 , m_position(position) |
| 113 , m_specificity(selector().specificity()) | 113 , m_specificity(selector().specificity()) |
| 114 , m_containsUncommonAttributeSelector(blink::containsUncommonAttributeSelect or(selector())) | 114 , m_containsUncommonAttributeSelector(blink::containsUncommonAttributeSelect or(selector())) |
| 115 , m_linkMatchType(selector().computeLinkMatchType()) | 115 , m_linkMatchType(selector().computeLinkMatchType()) |
| 116 , m_hasDocumentSecurityOrigin(addRuleFlags & RuleHasDocumentSecurityOrigin) | 116 , m_hasDocumentSecurityOrigin(addRuleFlags & RuleHasDocumentSecurityOrigin) |
| 117 , m_propertyWhitelistType(determinePropertyWhitelistType(addRuleFlags, selec tor())) | 117 , m_propertyWhitelistType(determinePropertyWhitelistType(addRuleFlags, selec tor())) |
| 118 { | 118 { |
| 119 SelectorFilter::collectIdentifierHashes(selector(), m_descendantSelectorIden tifierHashes, maximumIdentifierCount); | 119 SelectorFilter::collectIdentifierHashes(selector(), m_descendantSelectorIden tifierHashes, maximumIdentifierCount); |
| 120 } | 120 } |
| 121 | 121 |
| 122 RuleSet::~RuleSet() | |
| 123 { | |
| 124 } | |
| 125 | |
| 126 void RuleSet::dispose() | |
|
haraken
2015/10/08 06:15:45
Shall we add ENABLE(OILPAN)?
| |
| 127 { | |
| 128 m_idRules.clear(); | |
| 129 m_classRules.clear(); | |
| 130 m_tagRules.clear(); | |
| 131 m_shadowPseudoElementRules.clear(); | |
| 132 m_linkPseudoClassRules.clear(); | |
| 133 m_cuePseudoRules.clear(); | |
| 134 m_focusPseudoClassRules.clear(); | |
| 135 m_universalRules.clear(); | |
| 136 m_shadowHostRules.clear(); | |
| 137 m_features.clear(); | |
| 138 m_pageRules.clear(); | |
| 139 m_viewportRules.clear(); | |
| 140 m_fontFaceRules.clear(); | |
| 141 m_keyframesRules.clear(); | |
| 142 m_treeBoundaryCrossingRules.clear(); | |
| 143 m_shadowDistributedRules.clear(); | |
| 144 m_pendingRules.clear(); | |
| 145 } | |
| 146 | |
| 122 void RuleSet::addToRuleSet(const AtomicString& key, PendingRuleMap& map, const R uleData& ruleData) | 147 void RuleSet::addToRuleSet(const AtomicString& key, PendingRuleMap& map, const R uleData& ruleData) |
| 123 { | 148 { |
| 124 OwnPtrWillBeMember<WillBeHeapLinkedStack<RuleData>>& rules = map.add(key, nu llptr).storedValue->value; | 149 OwnPtrWillBeMember<WillBeHeapLinkedStack<RuleData>>& rules = map.add(key, nu llptr).storedValue->value; |
| 125 if (!rules) | 150 if (!rules) |
| 126 rules = adoptPtrWillBeNoop(new WillBeHeapLinkedStack<RuleData>); | 151 rules = adoptPtrWillBeNoop(new WillBeHeapLinkedStack<RuleData>); |
| 127 rules->push(ruleData); | 152 rules->push(ruleData); |
| 128 } | 153 } |
| 129 | 154 |
| 130 static void extractValuesforSelector(const CSSSelector* selector, AtomicString& id, AtomicString& className, AtomicString& customPseudoElementName, AtomicString & tagName) | 155 static void extractValuesforSelector(const CSSSelector* selector, AtomicString& id, AtomicString& className, AtomicString& customPseudoElementName, AtomicString & tagName) |
| 131 { | 156 { |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 394 | 419 |
| 395 #ifndef NDEBUG | 420 #ifndef NDEBUG |
| 396 void RuleSet::show() | 421 void RuleSet::show() |
| 397 { | 422 { |
| 398 for (const auto& rule: m_allRules) | 423 for (const auto& rule: m_allRules) |
| 399 rule.selector().show(); | 424 rule.selector().show(); |
| 400 } | 425 } |
| 401 #endif | 426 #endif |
| 402 | 427 |
| 403 } // namespace blink | 428 } // namespace blink |
| OLD | NEW |