| 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 // These return true if setNeedsStyleRecalc() should be run on the Element,
as a fallback. | |
| 124 bool computeInvalidationSetsForClassChange(const SpaceSplitString& changedCl
asses, Element*); | |
| 125 bool computeInvalidationSetsForClassChange(const SpaceSplitString& oldClasse
s, const SpaceSplitString& newClasses, Element*); | |
| 126 | |
| 127 enum SelectorFeatureCollectionMode { | 123 enum SelectorFeatureCollectionMode { |
| 128 ProcessClasses, | 124 ProcessClasses, |
| 129 DontProcessClasses | 125 DontProcessClasses |
| 130 }; | 126 }; |
| 131 | 127 |
| 132 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, Selec
torFeatureCollectionMode processClasses); | 128 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, Selec
torFeatureCollectionMode processClasses); |
| 133 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&, SelectorFeatureCollectionMode processClasses); | 129 void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata
&, SelectorFeatureCollectionMode processClasses); |
| 134 | 130 |
| 135 bool classInvalidationRequiresSubtreeRecalc(const AtomicString& className); | |
| 136 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); | 131 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); |
| 137 bool updateClassInvalidationSets(const CSSSelector&); | 132 bool updateClassInvalidationSets(const CSSSelector&); |
| 138 | 133 |
| 139 void addClassToInvalidationSet(const AtomicString& className, Element*); | 134 void addClassToInvalidationSet(const AtomicString& className, Element*); |
| 140 | 135 |
| 141 bool invalidateStyleForClassChange(Element*, Vector<AtomicString>&, bool fou
ndInvalidationSet); | 136 bool invalidateStyleForClassChange(Element*, Vector<AtomicString>&, bool fou
ndInvalidationSet); |
| 142 bool invalidateStyleForClassChangeOnChildren(Element*, Vector<AtomicString>&
invalidationClasses, bool foundInvalidationSet); | 137 bool invalidateStyleForClassChangeOnChildren(Element*, Vector<AtomicString>&
invalidationClasses, bool foundInvalidationSet); |
| 143 | 138 |
| 144 InvalidationList& ensurePendingInvalidationList(Element*); | 139 InvalidationList& ensurePendingInvalidationList(Element*); |
| 145 | 140 |
| 146 FeatureMetadata m_metadata; | 141 FeatureMetadata m_metadata; |
| 147 InvalidationSetMap m_classInvalidationSets; | 142 InvalidationSetMap m_classInvalidationSets; |
| 148 PendingInvalidationMap m_pendingInvalidationMap; | 143 PendingInvalidationMap m_pendingInvalidationMap; |
| 149 | 144 |
| 150 bool m_targetedStyleRecalcEnabled; | 145 bool m_targetedStyleRecalcEnabled; |
| 151 }; | 146 }; |
| 152 | 147 |
| 153 } // namespace WebCore | 148 } // namespace WebCore |
| 154 | 149 |
| 155 #endif // RuleFeature_h | 150 #endif // RuleFeature_h |
| OLD | NEW |