| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClas
ses, const SpaceSplitString& newClasses, Element&); | 85 void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClas
ses, const SpaceSplitString& newClasses, Element&); |
| 86 void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attrib
uteName, Element&); | 86 void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attrib
uteName, Element&); |
| 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 // Marks the given attribute name as "appearing in a selector". Used for | |
| 96 // CSS properties such as content: ... attr(...) ... | |
| 97 // FIXME: record these internally to this class instead calls from StyleReso
lver to here. | |
| 98 void addContentAttr(const AtomicString& attributeName); | |
| 99 | |
| 100 StyleInvalidator& styleInvalidator(); | 95 StyleInvalidator& styleInvalidator(); |
| 101 | 96 |
| 102 void trace(Visitor*); | 97 void trace(Visitor*); |
| 103 | 98 |
| 104 WillBeHeapVector<RuleFeature> siblingRules; | 99 WillBeHeapVector<RuleFeature> siblingRules; |
| 105 WillBeHeapVector<RuleFeature> uncommonAttributeRules; | 100 WillBeHeapVector<RuleFeature> uncommonAttributeRules; |
| 106 | 101 |
| 107 protected: | 102 protected: |
| 108 DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&); | 103 DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&); |
| 109 | 104 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 126 }; | 121 }; |
| 127 | 122 |
| 128 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&); | 123 void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&); |
| 129 | 124 |
| 130 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); | 125 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl
assName); |
| 131 DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString
& attributeName); | 126 DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString
& attributeName); |
| 132 DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attri
buteName); | 127 DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attri
buteName); |
| 133 DescendantInvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoTy
pe); | 128 DescendantInvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoTy
pe); |
| 134 | 129 |
| 135 void updateInvalidationSets(const CSSSelector&); | 130 void updateInvalidationSets(const CSSSelector&); |
| 131 void updateInvalidationSetsForContentAttribute(StyleRule*); |
| 136 | 132 |
| 137 struct InvalidationSetFeatures { | 133 struct InvalidationSetFeatures { |
| 138 InvalidationSetFeatures() | 134 InvalidationSetFeatures() |
| 139 : customPseudoElement(false) | 135 : customPseudoElement(false) |
| 140 , treeBoundaryCrossing(false) | 136 , treeBoundaryCrossing(false) |
| 141 , adjacent(false) | 137 , adjacent(false) |
| 142 , insertionPointCrossing(false) | 138 , insertionPointCrossing(false) |
| 143 , forceSubtree(false) | 139 , forceSubtree(false) |
| 144 { } | 140 { } |
| 145 | 141 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 172 InvalidationSetMap m_attributeInvalidationSets; | 168 InvalidationSetMap m_attributeInvalidationSets; |
| 173 InvalidationSetMap m_idInvalidationSets; | 169 InvalidationSetMap m_idInvalidationSets; |
| 174 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; | 170 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; |
| 175 StyleInvalidator m_styleInvalidator; | 171 StyleInvalidator m_styleInvalidator; |
| 176 }; | 172 }; |
| 177 | 173 |
| 178 | 174 |
| 179 } // namespace blink | 175 } // namespace blink |
| 180 | 176 |
| 181 #endif // RuleFeature_h | 177 #endif // RuleFeature_h |
| OLD | NEW |