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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void add(const FeatureMetadata& other); | 113 void add(const FeatureMetadata& other); |
114 void clear(); | 114 void clear(); |
115 | 115 |
116 bool usesFirstLineRules; | 116 bool usesFirstLineRules; |
117 bool foundSiblingSelector; | 117 bool foundSiblingSelector; |
118 unsigned maxDirectAdjacentSelectors; | 118 unsigned maxDirectAdjacentSelectors; |
119 HashSet<AtomicString> idsInRules; | 119 HashSet<AtomicString> idsInRules; |
120 HashSet<AtomicString> attrsInRules; | 120 HashSet<AtomicString> attrsInRules; |
121 }; | 121 }; |
122 | 122 |
123 enum SelectorFeatureCollectionMode { | 123 enum InvalidationSetMode { |
124 ProcessClasses, | 124 AddFeatures, |
125 DontProcessClasses | 125 UseLocalStyleChange, |
| 126 UseSubtreeStyleChange |
126 }; | 127 }; |
127 | 128 |
128 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, Selec
torFeatureCollectionMode processClasses); | 129 static InvalidationSetMode supportsClassDescendantInvalidation(const CSSSele
ctor&); |
129 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&, SelectorFeatureCollectionMode processClasses); | 130 |
| 131 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, Inval
idationSetMode); |
| 132 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&, InvalidationSetMode); |
130 | 133 |
131 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); | 134 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); |
132 bool updateClassInvalidationSets(const CSSSelector&); | 135 InvalidationSetMode updateClassInvalidationSets(const CSSSelector&); |
133 | 136 |
134 void addClassToInvalidationSet(const AtomicString& className, Element*); | 137 void addClassToInvalidationSet(const AtomicString& className, Element*); |
135 | 138 |
136 bool invalidateStyleForClassChange(Element*, Vector<AtomicString>&, bool fou
ndInvalidationSet); | 139 bool invalidateStyleForClassChange(Element*, Vector<AtomicString>&, bool fou
ndInvalidationSet); |
137 bool invalidateStyleForClassChangeOnChildren(Element*, Vector<AtomicString>&
invalidationClasses, bool foundInvalidationSet); | 140 bool invalidateStyleForClassChangeOnChildren(Element*, Vector<AtomicString>&
invalidationClasses, bool foundInvalidationSet); |
138 | 141 |
139 InvalidationList& ensurePendingInvalidationList(Element*); | 142 InvalidationList& ensurePendingInvalidationList(Element*); |
140 | 143 |
141 FeatureMetadata m_metadata; | 144 FeatureMetadata m_metadata; |
142 InvalidationSetMap m_classInvalidationSets; | 145 InvalidationSetMap m_classInvalidationSets; |
143 PendingInvalidationMap m_pendingInvalidationMap; | 146 PendingInvalidationMap m_pendingInvalidationMap; |
144 | 147 |
145 bool m_targetedStyleRecalcEnabled; | 148 bool m_targetedStyleRecalcEnabled; |
146 }; | 149 }; |
147 | 150 |
148 } // namespace WebCore | 151 } // namespace WebCore |
149 | 152 |
150 #endif // RuleFeature_h | 153 #endif // RuleFeature_h |
OLD | NEW |