OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All rights reserved. |
4 * | 5 * |
5 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
9 * | 10 * |
10 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 14 * Library General Public License for more details. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 HeapVector<RuleFeature> siblingRules; | 143 HeapVector<RuleFeature> siblingRules; |
143 HeapVector<RuleFeature> uncommonAttributeRules; | 144 HeapVector<RuleFeature> uncommonAttributeRules; |
144 | 145 |
145 bool isAlive() const { return m_isAlive; } | 146 bool isAlive() const { return m_isAlive; } |
146 | 147 |
147 protected: | 148 protected: |
148 InvalidationSet* invalidationSetForSimpleSelector(const CSSSelector&, | 149 InvalidationSet* invalidationSetForSimpleSelector(const CSSSelector&, |
149 InvalidationType); | 150 InvalidationType); |
150 | 151 |
151 private: | 152 private: |
152 // Each map entry is either a DescendantInvalidationSet or SiblingInvalidation
Set. | 153 // Each map entry is either a DescendantInvalidationSet or |
153 // When both are needed, we store the SiblingInvalidationSet, and use it to ho
ld the DescendantInvalidationSet. | 154 // SiblingInvalidationSet. |
| 155 // When both are needed, we store the SiblingInvalidationSet, and use it to |
| 156 // hold the DescendantInvalidationSet. |
154 using InvalidationSetMap = HashMap<AtomicString, RefPtr<InvalidationSet>>; | 157 using InvalidationSetMap = HashMap<AtomicString, RefPtr<InvalidationSet>>; |
155 using PseudoTypeInvalidationSetMap = | 158 using PseudoTypeInvalidationSetMap = |
156 HashMap<CSSSelector::PseudoType, | 159 HashMap<CSSSelector::PseudoType, |
157 RefPtr<InvalidationSet>, | 160 RefPtr<InvalidationSet>, |
158 WTF::IntHash<unsigned>, | 161 WTF::IntHash<unsigned>, |
159 WTF::UnsignedWithZeroKeyHashTraits<unsigned>>; | 162 WTF::UnsignedWithZeroKeyHashTraits<unsigned>>; |
160 | 163 |
161 struct FeatureMetadata { | 164 struct FeatureMetadata { |
162 DISALLOW_NEW(); | 165 DISALLOW_NEW(); |
163 void add(const FeatureMetadata& other); | 166 void add(const FeatureMetadata& other); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 277 |
275 // If true, the RuleFeatureSet is alive and can be used. | 278 // If true, the RuleFeatureSet is alive and can be used. |
276 unsigned m_isAlive : 1; | 279 unsigned m_isAlive : 1; |
277 | 280 |
278 friend class RuleFeatureSetTest; | 281 friend class RuleFeatureSetTest; |
279 }; | 282 }; |
280 | 283 |
281 } // namespace blink | 284 } // namespace blink |
282 | 285 |
283 #endif // RuleFeature_h | 286 #endif // RuleFeature_h |
OLD | NEW |