| Index: Source/core/css/RuleFeature.h
|
| diff --git a/Source/core/css/RuleFeature.h b/Source/core/css/RuleFeature.h
|
| index fa3037958cebc803bde2939008d2edf747d5f1ad..9ae722d2fc3b07ee6a13eb7afa2c629d2c60a964 100644
|
| --- a/Source/core/css/RuleFeature.h
|
| +++ b/Source/core/css/RuleFeature.h
|
| @@ -29,14 +29,15 @@
|
|
|
| namespace WebCore {
|
|
|
| -class Document;
|
| -class Node;
|
| -class ShadowRoot;
|
| -class StyleRule;
|
| class CSSSelector;
|
| class CSSSelectorList;
|
| +class Document;
|
| +class Node;
|
| +class QualifiedName;
|
| class RuleData;
|
| +class ShadowRoot;
|
| class SpaceSplitString;
|
| +class StyleRule;
|
|
|
| struct RuleFeature {
|
| RuleFeature(StyleRule* rule, unsigned selectorIndex, bool hasDocumentSecurityOrigin)
|
| @@ -69,7 +70,7 @@ public:
|
| inline bool hasSelectorForAttribute(const AtomicString& attributeName) const
|
| {
|
| ASSERT(!attributeName.isEmpty());
|
| - return m_metadata.attrsInRules.contains(attributeName);
|
| + return m_attributeInvalidationSets.get(attributeName);
|
| }
|
|
|
| inline bool hasSelectorForClass(const AtomicString& classValue) const
|
| @@ -86,6 +87,8 @@ public:
|
| void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changedClasses, Element*);
|
| void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClasses, const SpaceSplitString& newClasses, Element*);
|
|
|
| + void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attributeName, Element*);
|
| +
|
| // Clears all style invalidation state for the passed node.
|
| void clearStyleInvalidation(Node*);
|
|
|
| @@ -96,7 +99,8 @@ public:
|
|
|
| // Marks the given attribute name as "appearing in a selector". Used for
|
| // CSS properties such as content: ... attr(...) ...
|
| - void addAttributeInASelector(const AtomicString& attributeName);
|
| + // FIXME: record these internally to this class instead calls from StyleResolver to here.
|
| + void addAttributeFromAContentAttrValue(const AtomicString& attributeName);
|
|
|
| Vector<RuleFeature> siblingRules;
|
| Vector<RuleFeature> uncommonAttributeRules;
|
| @@ -122,7 +126,6 @@ private:
|
| bool foundSiblingSelector;
|
| unsigned maxDirectAdjacentSelectors;
|
| HashSet<AtomicString> idsInRules;
|
| - HashSet<AtomicString> attrsInRules;
|
| };
|
|
|
| enum InvalidationSetMode {
|
| @@ -137,7 +140,10 @@ private:
|
| void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata&, InvalidationSetMode);
|
|
|
| DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& className);
|
| - InvalidationSetMode updateClassInvalidationSets(const CSSSelector&);
|
| + DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString& className);
|
| + DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&);
|
| +
|
| + InvalidationSetMode updateInvalidationSets(const CSSSelector&);
|
|
|
| void addClassToInvalidationSet(const AtomicString& className, Element*);
|
|
|
| @@ -145,6 +151,8 @@ private:
|
|
|
| FeatureMetadata m_metadata;
|
| InvalidationSetMap m_classInvalidationSets;
|
| + InvalidationSetMap m_attributeInvalidationSets;
|
| +
|
| PendingInvalidationMap m_pendingInvalidationMap;
|
|
|
| bool m_targetedStyleRecalcEnabled;
|
|
|