Chromium Code Reviews| Index: Source/core/css/RuleFeature.h |
| diff --git a/Source/core/css/RuleFeature.h b/Source/core/css/RuleFeature.h |
| index 75df79fbeea1d2ca93a0b868b1780b8c9337ae55..ec4188065f959c1287b7db089d2067830c5f93f6 100644 |
| --- a/Source/core/css/RuleFeature.h |
| +++ b/Source/core/css/RuleFeature.h |
| @@ -82,7 +82,7 @@ public: |
| inline bool hasSelectorForId(const AtomicString& idValue) const |
| { |
| - return m_metadata.idsInRules.contains(idValue); |
| + return m_idInvalidationSets.get(idValue); |
|
esprehn
2014/04/01 23:11:19
This can still be contains right? Same with the ab
chrishtr
2014/04/01 23:20:08
Done.
|
| } |
| void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changedClasses, Element&); |
| @@ -90,9 +90,11 @@ public: |
| void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attributeName, Element&); |
| + void scheduleStyleInvalidationForIdChange(const AtomicString& oldId, const AtomicString& newId, Element&); |
| + |
| int hasIdsInSelectors() const |
| { |
| - return m_metadata.idsInRules.size() > 0; |
| + return m_idInvalidationSets.size() > 0; |
|
esprehn
2014/04/01 23:11:19
This function should really return a bool too
chrishtr
2014/04/01 23:20:08
Done.
|
| } |
| // Marks the given attribute name as "appearing in a selector". Used for |
| @@ -120,7 +122,6 @@ private: |
| bool usesFirstLineRules; |
| bool foundSiblingSelector; |
| unsigned maxDirectAdjacentSelectors; |
| - HashSet<AtomicString> idsInRules; |
| }; |
| enum InvalidationSetMode { |
| @@ -136,6 +137,7 @@ private: |
| DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& className); |
| DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString& attributeName); |
| + DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attributeName); |
| DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&); |
| InvalidationSetMode updateInvalidationSets(const CSSSelector&); |
| @@ -156,6 +158,7 @@ private: |
| FeatureMetadata m_metadata; |
| InvalidationSetMap m_classInvalidationSets; |
| InvalidationSetMap m_attributeInvalidationSets; |
| + InvalidationSetMap m_idInvalidationSets; |
| bool m_targetedStyleRecalcEnabled; |
| StyleInvalidator m_styleInvalidator; |
| }; |