| Index: Source/core/css/RuleFeature.h
|
| diff --git a/Source/core/css/RuleFeature.h b/Source/core/css/RuleFeature.h
|
| index bed17a70747a06bfc5c895de386d0dab0fa318ba..ded4852affbabf932006c533f09be43ca2050c86 100644
|
| --- a/Source/core/css/RuleFeature.h
|
| +++ b/Source/core/css/RuleFeature.h
|
| @@ -125,41 +125,48 @@ private:
|
| unsigned maxDirectAdjacentSelectors;
|
| };
|
|
|
| - enum InvalidationSetMode {
|
| - AddFeatures,
|
| - UseLocalStyleChange,
|
| - UseSubtreeStyleChange
|
| - };
|
| -
|
| - static InvalidationSetMode invalidationSetModeForSelector(const CSSSelector&);
|
| -
|
| - void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, InvalidationSetMode);
|
| - void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata&, InvalidationSetMode);
|
| + void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&);
|
|
|
| DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& className);
|
| DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString& attributeName);
|
| DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attributeName);
|
| DescendantInvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoType);
|
|
|
| - InvalidationSetMode updateInvalidationSets(const CSSSelector&);
|
| + void updateInvalidationSets(const CSSSelector&);
|
|
|
| struct InvalidationSetFeatures {
|
| InvalidationSetFeatures()
|
| : customPseudoElement(false)
|
| , treeBoundaryCrossing(false)
|
| - , wholeSubtree(false)
|
| + , insertionPointCrossing(false)
|
| + , adjacent(false)
|
| + , hasFeatures(false)
|
| { }
|
| +
|
| + void addClass(AtomicString className) { classes.append(className); hasFeatures = true; }
|
| + void addAttribute(AtomicString attribute) { attributes.append(attribute); hasFeatures = true; }
|
| + void setId(AtomicString idString) { id = idString; hasFeatures = true; }
|
| + void setTagName(AtomicString tag) { tagName = tag; hasFeatures = true; }
|
| + void setHasCustomPseudo() { customPseudoElement = true; hasFeatures = true; }
|
| +
|
| + bool useSubtreeInvalidation() const { return !hasFeatures || adjacent; }
|
| +
|
| Vector<AtomicString> classes;
|
| Vector<AtomicString> attributes;
|
| AtomicString id;
|
| AtomicString tagName;
|
| +
|
| bool customPseudoElement;
|
| bool treeBoundaryCrossing;
|
| - bool wholeSubtree;
|
| + bool insertionPointCrossing;
|
| + bool adjacent;
|
| + bool hasFeatures;
|
| };
|
|
|
| static void extractInvalidationSetFeature(const CSSSelector&, InvalidationSetFeatures&);
|
| const CSSSelector* extractInvalidationSetFeatures(const CSSSelector&, InvalidationSetFeatures&, bool negated);
|
| +
|
| + void addFeaturesToInvalidationSet(DescendantInvalidationSet&, const InvalidationSetFeatures&);
|
| void addFeaturesToInvalidationSets(const CSSSelector&, InvalidationSetFeatures&);
|
|
|
| void addClassToInvalidationSet(const AtomicString& className, Element&);
|
|
|