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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 inline bool hasSelectorForAttribute(const AtomicString& attributeName) const | 69 inline bool hasSelectorForAttribute(const AtomicString& attributeName) const |
70 { | 70 { |
71 ASSERT(!attributeName.isEmpty()); | 71 ASSERT(!attributeName.isEmpty()); |
72 return m_metadata.attrsInRules.contains(attributeName); | 72 return m_metadata.attrsInRules.contains(attributeName); |
73 } | 73 } |
74 | 74 |
75 inline bool hasSelectorForClass(const AtomicString& classValue) const | 75 inline bool hasSelectorForClass(const AtomicString& classValue) const |
76 { | 76 { |
77 ASSERT(!classValue.isEmpty()); | 77 ASSERT(!classValue.isEmpty()); |
78 return m_classInvalidationSets.get(classValue); | 78 return m_classInvalidationSets.get(classValue); |
79 | |
80 } | 79 } |
81 | 80 |
82 inline bool hasSelectorForId(const AtomicString& idValue) const | 81 inline bool hasSelectorForId(const AtomicString& idValue) const |
83 { | 82 { |
84 return m_metadata.idsInRules.contains(idValue); | 83 return m_metadata.idsInRules.contains(idValue); |
85 } | 84 } |
86 | 85 |
87 void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changed
Classes, Element*); | 86 void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changed
Classes, Element*); |
88 void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClas
ses, const SpaceSplitString& newClasses, Element*); | 87 void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClas
ses, const SpaceSplitString& newClasses, Element*); |
89 | 88 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 static InvalidationSetMode supportsClassDescendantInvalidation(const CSSSele
ctor&); | 132 static InvalidationSetMode supportsClassDescendantInvalidation(const CSSSele
ctor&); |
134 | 133 |
135 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, Inval
idationSetMode); | 134 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, Inval
idationSetMode); |
136 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&, InvalidationSetMode); | 135 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&, InvalidationSetMode); |
137 | 136 |
138 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); | 137 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); |
139 InvalidationSetMode updateClassInvalidationSets(const CSSSelector&); | 138 InvalidationSetMode updateClassInvalidationSets(const CSSSelector&); |
140 | 139 |
141 void addClassToInvalidationSet(const AtomicString& className, Element*); | 140 void addClassToInvalidationSet(const AtomicString& className, Element*); |
142 | 141 |
143 bool invalidateStyleForClassChange(Element*, Vector<AtomicString>&, bool fou
ndInvalidationSet); | |
144 bool invalidateStyleForClassChangeOnChildren(Element*, Vector<AtomicString>&
invalidationClasses, bool foundInvalidationSet); | |
145 | |
146 InvalidationList& ensurePendingInvalidationList(Element*); | 142 InvalidationList& ensurePendingInvalidationList(Element*); |
147 | 143 |
148 FeatureMetadata m_metadata; | 144 FeatureMetadata m_metadata; |
149 InvalidationSetMap m_classInvalidationSets; | 145 InvalidationSetMap m_classInvalidationSets; |
150 PendingInvalidationMap m_pendingInvalidationMap; | 146 PendingInvalidationMap m_pendingInvalidationMap; |
151 | 147 |
152 bool m_targetedStyleRecalcEnabled; | 148 bool m_targetedStyleRecalcEnabled; |
| 149 |
| 150 friend class StyleInvalidationTreeWalk; |
153 }; | 151 }; |
154 | 152 |
| 153 |
155 } // namespace WebCore | 154 } // namespace WebCore |
156 | 155 |
157 #endif // RuleFeature_h | 156 #endif // RuleFeature_h |
OLD | NEW |