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.
All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 23 matching lines...) Expand all Loading... |
34 class QualifiedName; | 34 class QualifiedName; |
35 class RuleData; | 35 class RuleData; |
36 class SpaceSplitString; | 36 class SpaceSplitString; |
37 class StyleRule; | 37 class StyleRule; |
38 | 38 |
39 struct RuleFeature { | 39 struct RuleFeature { |
40 ALLOW_ONLY_INLINE_ALLOCATION(); | 40 ALLOW_ONLY_INLINE_ALLOCATION(); |
41 public: | 41 public: |
42 RuleFeature(StyleRule* rule, unsigned selectorIndex, bool hasDocumentSecurit
yOrigin); | 42 RuleFeature(StyleRule* rule, unsigned selectorIndex, bool hasDocumentSecurit
yOrigin); |
43 | 43 |
44 void trace(Visitor*); | 44 DECLARE_TRACE(); |
45 | 45 |
46 RawPtrWillBeMember<StyleRule> rule; | 46 RawPtrWillBeMember<StyleRule> rule; |
47 unsigned selectorIndex; | 47 unsigned selectorIndex; |
48 bool hasDocumentSecurityOrigin; | 48 bool hasDocumentSecurityOrigin; |
49 }; | 49 }; |
50 | 50 |
51 class RuleFeatureSet { | 51 class RuleFeatureSet { |
52 DISALLOW_ALLOCATION(); | 52 DISALLOW_ALLOCATION(); |
53 public: | 53 public: |
54 RuleFeatureSet(); | 54 RuleFeatureSet(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void scheduleStyleInvalidationForIdChange(const AtomicString& oldId, const A
tomicString& newId, Element&); | 87 void scheduleStyleInvalidationForIdChange(const AtomicString& oldId, const A
tomicString& newId, Element&); |
88 void scheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoType, Eleme
nt&); | 88 void scheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoType, Eleme
nt&); |
89 | 89 |
90 bool hasIdsInSelectors() const | 90 bool hasIdsInSelectors() const |
91 { | 91 { |
92 return m_idInvalidationSets.size() > 0; | 92 return m_idInvalidationSets.size() > 0; |
93 } | 93 } |
94 | 94 |
95 StyleInvalidator& styleInvalidator(); | 95 StyleInvalidator& styleInvalidator(); |
96 | 96 |
97 void trace(Visitor*); | 97 DECLARE_TRACE(); |
98 | 98 |
99 WillBeHeapVector<RuleFeature> siblingRules; | 99 WillBeHeapVector<RuleFeature> siblingRules; |
100 WillBeHeapVector<RuleFeature> uncommonAttributeRules; | 100 WillBeHeapVector<RuleFeature> uncommonAttributeRules; |
101 | 101 |
102 protected: | 102 protected: |
103 DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&); | 103 DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&); |
104 | 104 |
105 private: | 105 private: |
106 typedef WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<DescendantInvalid
ationSet> > InvalidationSetMap; | 106 typedef WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<DescendantInvalid
ationSet> > InvalidationSetMap; |
107 typedef WillBeHeapHashMap<CSSSelector::PseudoType, RefPtrWillBeMember<Descen
dantInvalidationSet>, WTF::IntHash<unsigned>, WTF::UnsignedWithZeroKeyHashTraits
<unsigned> > PseudoTypeInvalidationSetMap; | 107 typedef WillBeHeapHashMap<CSSSelector::PseudoType, RefPtrWillBeMember<Descen
dantInvalidationSet>, WTF::IntHash<unsigned>, WTF::UnsignedWithZeroKeyHashTraits
<unsigned> > PseudoTypeInvalidationSetMap; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 InvalidationSetMap m_attributeInvalidationSets; | 172 InvalidationSetMap m_attributeInvalidationSets; |
173 InvalidationSetMap m_idInvalidationSets; | 173 InvalidationSetMap m_idInvalidationSets; |
174 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; | 174 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; |
175 StyleInvalidator m_styleInvalidator; | 175 StyleInvalidator m_styleInvalidator; |
176 }; | 176 }; |
177 | 177 |
178 | 178 |
179 } // namespace blink | 179 } // namespace blink |
180 | 180 |
181 #endif // RuleFeature_h | 181 #endif // RuleFeature_h |
OLD | NEW |