Index: Source/core/css/RuleFeature.cpp |
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp |
index 250988215f7eec346be477df3f55375af0de70d8..0d9b6424a82810f9838d6ad7c85acab6b9feb738 100644 |
--- a/Source/core/css/RuleFeature.cpp |
+++ b/Source/core/css/RuleFeature.cpp |
@@ -37,32 +37,39 @@ |
#include "core/css/invalidation/DescendantInvalidationSet.h" |
#include "core/dom/Element.h" |
#include "core/dom/Node.h" |
-#include "platform/RuntimeEnabledFeatures.h" |
#include "wtf/BitVector.h" |
namespace blink { |
-static bool isSkippableComponentForInvalidation(const CSSSelector& selector) |
+static void assertSupportedMatch(CSSSelector::Match match) |
{ |
- if (selector.match() == CSSSelector::Tag) { |
- ASSERT(selector.tagQName().localName() == starAtom); |
- return true; |
- } |
- if (selector.match() == CSSSelector::PseudoElement) { |
- switch (selector.pseudoType()) { |
- case CSSSelector::PseudoBefore: |
- case CSSSelector::PseudoAfter: |
- case CSSSelector::PseudoBackdrop: |
- case CSSSelector::PseudoShadow: |
- return true; |
- default: |
- ASSERT(!selector.isCustomPseudoElement()); |
- return false; |
- } |
+ switch (match) { |
+ case CSSSelector::Tag: |
+ case CSSSelector::Id: |
+ case CSSSelector::Class: |
+ case CSSSelector::AttributeExact: |
+ case CSSSelector::AttributeSet: |
+ case CSSSelector::AttributeHyphen: |
+ case CSSSelector::AttributeList: |
+ case CSSSelector::AttributeContain: |
+ case CSSSelector::AttributeBegin: |
+ case CSSSelector::AttributeEnd: |
+ break; |
+ case CSSSelector::Unknown: |
+ case CSSSelector::PagePseudoClass: |
+ // These should not appear in StyleRule selectors. |
+ ASSERT_NOT_REACHED(); |
+ break; |
+ default: |
+ // New match type added. Figure out if it needs a subtree recalc or not. |
+ ASSERT_NOT_REACHED(); |
+ break; |
} |
- if (selector.match() != CSSSelector::PseudoClass) |
- return false; |
- switch (selector.pseudoType()) { |
+} |
+ |
+static void assertSupportedPseudo(CSSSelector::PseudoType type) |
+{ |
+ switch (type) { |
case CSSSelector::PseudoEmpty: |
case CSSSelector::PseudoFirstChild: |
case CSSSelector::PseudoFirstOfType: |
@@ -76,6 +83,7 @@ static bool isSkippableComponentForInvalidation(const CSSSelector& selector) |
case CSSSelector::PseudoNthLastOfType: |
case CSSSelector::PseudoLink: |
case CSSSelector::PseudoVisited: |
+ case CSSSelector::PseudoAny: |
case CSSSelector::PseudoAnyLink: |
case CSSSelector::PseudoHover: |
case CSSSelector::PseudoDrag: |
@@ -93,15 +101,90 @@ static bool isSkippableComponentForInvalidation(const CSSSelector& selector) |
case CSSSelector::PseudoInvalid: |
case CSSSelector::PseudoIndeterminate: |
case CSSSelector::PseudoTarget: |
+ case CSSSelector::PseudoBefore: |
+ case CSSSelector::PseudoAfter: |
+ case CSSSelector::PseudoBackdrop: |
case CSSSelector::PseudoLang: |
+ case CSSSelector::PseudoNot: |
case CSSSelector::PseudoRoot: |
case CSSSelector::PseudoScope: |
case CSSSelector::PseudoInRange: |
case CSSSelector::PseudoOutOfRange: |
+ case CSSSelector::PseudoUserAgentCustomElement: |
+ case CSSSelector::PseudoWebKitCustomElement: |
case CSSSelector::PseudoUnresolved: |
+ case CSSSelector::PseudoHost: |
+ case CSSSelector::PseudoShadow: |
case CSSSelector::PseudoListBox: |
+ case CSSSelector::PseudoAutofill: |
+ case CSSSelector::PseudoFullPageMedia: |
+ case CSSSelector::PseudoResizer: |
+ case CSSSelector::PseudoScrollbar: |
+ case CSSSelector::PseudoScrollbarBack: |
+ case CSSSelector::PseudoScrollbarButton: |
+ case CSSSelector::PseudoScrollbarCorner: |
+ case CSSSelector::PseudoScrollbarForward: |
+ case CSSSelector::PseudoScrollbarThumb: |
+ case CSSSelector::PseudoScrollbarTrack: |
+ case CSSSelector::PseudoScrollbarTrackPiece: |
+ case CSSSelector::PseudoWindowInactive: |
+ case CSSSelector::PseudoCornerPresent: |
+ case CSSSelector::PseudoDecrement: |
+ case CSSSelector::PseudoIncrement: |
+ case CSSSelector::PseudoHorizontal: |
+ case CSSSelector::PseudoVertical: |
+ case CSSSelector::PseudoStart: |
+ case CSSSelector::PseudoEnd: |
+ case CSSSelector::PseudoDoubleButton: |
+ case CSSSelector::PseudoSingleButton: |
+ case CSSSelector::PseudoNoButton: |
+ case CSSSelector::PseudoSelection: |
+ case CSSSelector::PseudoFullScreen: |
+ case CSSSelector::PseudoFullScreenDocument: |
+ case CSSSelector::PseudoFullScreenAncestor: |
+ case CSSSelector::PseudoCue: |
+ case CSSSelector::PseudoFutureCue: |
+ case CSSSelector::PseudoPastCue: |
+ case CSSSelector::PseudoContent: |
+ case CSSSelector::PseudoSpatialNavigationFocus: |
+ break; |
+ case CSSSelector::PseudoNotParsed: |
+ case CSSSelector::PseudoUnknown: |
+ case CSSSelector::PseudoLeftPage: |
+ case CSSSelector::PseudoRightPage: |
+ case CSSSelector::PseudoFirstPage: |
+ // These should not appear in StyleRule selectors. |
+ ASSERT_NOT_REACHED(); |
+ break; |
+ default: |
+ // New pseudo type added. Figure out if it needs a subtree recalc or not. |
+ ASSERT_NOT_REACHED(); |
+ break; |
+ } |
+} |
+ |
+static bool requiresSubtreeRecalc(const CSSSelector& selector) |
+{ |
+ if (!selector.matchesPseudoElement() && selector.match() != CSSSelector::PseudoClass) { |
+ assertSupportedMatch(selector.match()); |
+ return false; |
+ } |
+ |
+ switch (selector.pseudoType()) { |
+ case CSSSelector::PseudoFirstLine: |
+ // :first-line pseudo can apply to elements arbitrarily deep down in the |
+ // DOM from its container given an arbitrary number of block descendants |
+ // with no inline flow content in between. |
+ case CSSSelector::PseudoFirstLetter: |
+ // :first-letter pseudo elements can be arbitrarily deep down in the |
+ // DOM from its container given an arbitrary number of block descendants |
+ // with no text content in between. |
+ case CSSSelector::PseudoHostContext: |
+ // :host-context matches a shadow host, yet the simple selectors inside |
+ // :host-context matches an ancestor of the shadow host. |
return true; |
default: |
+ assertSupportedPseudo(selector.pseudoType()); |
return false; |
} |
} |
@@ -118,80 +201,18 @@ void RuleFeature::trace(Visitor* visitor) |
visitor->trace(rule); |
} |
-// This method is somewhat conservative in what it accepts. |
-RuleFeatureSet::InvalidationSetMode RuleFeatureSet::invalidationSetModeForSelector(const CSSSelector& selector) |
-{ |
- bool foundCombinator = false; |
- bool foundIdent = false; |
- for (const CSSSelector* component = &selector; component; component = component->tagHistory()) { |
- |
- if (component->match() == CSSSelector::Class || component->match() == CSSSelector::Id |
- || (component->match() == CSSSelector::Tag && component->tagQName().localName() != starAtom) |
- || component->isAttributeSelector() || component->isCustomPseudoElement()) { |
- if (!foundCombinator) { |
- // We have found an invalidation set feature in the rightmost compound selector. |
- foundIdent = true; |
- } |
- } else if (component->pseudoType() == CSSSelector::PseudoNot |
- || component->pseudoType() == CSSSelector::PseudoHost |
- || component->pseudoType() == CSSSelector::PseudoAny) { |
- if (const CSSSelectorList* selectorList = component->selectorList()) { |
- // Features inside :not() are not added to the feature set, so consider it a universal selector. |
- bool foundUniversal = component->pseudoType() == CSSSelector::PseudoNot; |
- for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) { |
- // Find the invalidation set mode for each of the selectors in the selector list |
- // of a :not(), :host(), etc. For instance, ".x :-webkit-any(.a, .b)" yields an |
- // AddFeatures mode for both ".a" and ".b". ":-webkit-any(.a, *)" yields AddFeatures |
- // for ".a", but UseSubtreeStyleChange for "*". One sub-selector without invalidation |
- // set features is sufficient to cause the selector to be a universal selector as far |
- // the invalidation set is concerned. |
- InvalidationSetMode subSelectorMode = invalidationSetModeForSelector(*selector); |
- |
- // The sub-selector contained something unskippable, fall back to whole subtree |
- // recalcs in collectFeaturesFromSelector. subSelectorMode will return |
- // UseSubtreeStyleChange since there are no combinators inside the selector list, |
- // so translate it to UseLocalStyleChange if a combinator has been seen in the |
- // outer context. |
- // |
- // FIXME: Is UseSubtreeStyleChange ever needed as input to collectFeaturesFromSelector? |
- // That is, are there any selectors for which we need to use SubtreeStyleChange for |
- // changing features when present in the rightmost compound selector? |
- if (subSelectorMode == UseSubtreeStyleChange) |
- return foundCombinator ? UseLocalStyleChange : UseSubtreeStyleChange; |
- |
- // We found no features in the sub-selector, only skippable ones (foundIdent was |
- // false at the end of this method). That is a universal selector as far as the |
- // invalidation set is concerned. |
- if (subSelectorMode == UseLocalStyleChange) |
- foundUniversal = true; |
- } |
- if (!foundUniversal && !foundCombinator) { |
- // All sub-selectors contained invalidation set features and |
- // we are in the rightmost compound selector. |
- foundIdent = true; |
- } |
- } |
- } else if (!isSkippableComponentForInvalidation(*component)) { |
- return foundCombinator ? UseLocalStyleChange : UseSubtreeStyleChange; |
- } |
- if (component->relation() != CSSSelector::SubSelector) |
- foundCombinator = true; |
- } |
- return foundIdent ? AddFeatures : UseLocalStyleChange; |
-} |
- |
void RuleFeatureSet::extractInvalidationSetFeature(const CSSSelector& selector, InvalidationSetFeatures& features) |
{ |
- if (selector.match() == CSSSelector::Tag) |
- features.tagName = selector.tagQName().localName(); |
+ if (selector.match() == CSSSelector::Tag && selector.tagQName().localName() != starAtom) |
+ features.setTagName(selector.tagQName().localName()); |
else if (selector.match() == CSSSelector::Id) |
- features.id = selector.value(); |
+ features.setId(selector.value()); |
else if (selector.match() == CSSSelector::Class) |
- features.classes.append(selector.value()); |
+ features.addClass(selector.value()); |
else if (selector.isAttributeSelector()) |
- features.attributes.append(selector.attribute().localName()); |
+ features.addAttribute(selector.attribute().localName()); |
else if (selector.isCustomPseudoElement()) |
- features.customPseudoElement = true; |
+ features.setHasCustomPseudo(); |
} |
RuleFeatureSet::RuleFeatureSet() |
@@ -233,20 +254,17 @@ DescendantInvalidationSet* RuleFeatureSet::invalidationSetForSelector(const CSSS |
// Given a selector, update the descendant invalidation sets for the features found |
// in the selector. The first step is to extract the features from the rightmost |
-// compound selector (extractInvalidationSetFeatures). Secondly, those features will be |
-// added to the invalidation sets for the features found in the other compound selectors |
-// (addFeaturesToInvalidationSets). |
+// compound selector (extractInvalidationSetFeatures). Secondly, add those features |
+// to the invalidation sets for the features found in the other compound selectors |
+// (addFeaturesToInvalidationSets). If we find a feature in the right-most compound |
+// selector that requires a subtree recalc, we addFeaturesToInvalidationSets for the |
+// rightmost compound selector as well. |
-RuleFeatureSet::InvalidationSetMode RuleFeatureSet::updateInvalidationSets(const CSSSelector& selector) |
+void RuleFeatureSet::updateInvalidationSets(const CSSSelector& selector) |
{ |
- InvalidationSetMode mode = invalidationSetModeForSelector(selector); |
- if (mode != AddFeatures) |
- return mode; |
- |
InvalidationSetFeatures features; |
if (const CSSSelector* current = extractInvalidationSetFeatures(selector, features, false)) |
addFeaturesToInvalidationSets(*current, features); |
- return AddFeatures; |
} |
const CSSSelector* RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelector& selector, InvalidationSetFeatures& features, bool negated) |
@@ -254,30 +272,44 @@ const CSSSelector* RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelec |
for (const CSSSelector* current = &selector; current; current = current->tagHistory()) { |
if (!negated) |
extractInvalidationSetFeature(*current, features); |
- // Initialize the entry in the invalidation set map, if supported. |
- invalidationSetForSelector(*current); |
- if (current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny || current->pseudoType() == CSSSelector::PseudoNot) { |
+ if (!invalidationSetForSelector(*current)) { |
+ if (requiresSubtreeRecalc(*current)) { |
+ // Fall back to use subtree invalidations, even for features in the |
+ // rightmost compound selector. Returning the start &selector here |
+ // will make addFeaturesToInvalidationSets start marking invalidation |
+ // sets for subtree recalc for features in the rightmost compound |
+ // selector. |
+ features.hasFeatures = false; |
chrishtr
2014/10/10 16:45:06
It's a weird to trigger subtree by setting hasFeat
|
+ return &selector; |
+ } |
if (const CSSSelectorList* selectorList = current->selectorList()) { |
- for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) |
- extractInvalidationSetFeatures(*selector, features, current->pseudoType() == CSSSelector::PseudoNot); |
+ const CSSSelector* subSelector = selectorList->first(); |
+ bool hadFeatures = features.hasFeatures; |
+ bool allSubSelectorsHaveFeatures = !!subSelector; |
+ for (; subSelector; subSelector = CSSSelectorList::next(*subSelector)) { |
+ features.hasFeatures = false; |
+ if (extractInvalidationSetFeatures(*subSelector, features, current->pseudoType() == CSSSelector::PseudoNot)) { |
+ // A non-null return means the sub-selector contained a selector |
+ // which requiresSubtreeRecalc(). Return the rightmost selector |
+ // to mark for subtree recalcs like above. |
+ ASSERT(!features.hasFeatures); |
+ return &selector; |
+ } |
+ allSubSelectorsHaveFeatures &= features.hasFeatures; |
+ } |
+ features.hasFeatures = hadFeatures || allSubSelectorsHaveFeatures; |
} |
} |
- switch (current->relation()) { |
- case CSSSelector::SubSelector: |
- break; |
- case CSSSelector::ShadowPseudo: |
- case CSSSelector::ShadowDeep: |
+ if (current->relation() == CSSSelector::SubSelector) |
+ continue; |
+ |
+ if (current->isShadowSelector()) |
features.treeBoundaryCrossing = true; |
- return current->tagHistory(); |
- case CSSSelector::DirectAdjacent: |
- case CSSSelector::IndirectAdjacent: |
- features.wholeSubtree = true; |
- return current->tagHistory(); |
- case CSSSelector::Descendant: |
- case CSSSelector::Child: |
- return current->tagHistory(); |
- } |
+ |
+ features.adjacent = current->isAdjacentSelector(); |
+ |
+ return current->tagHistory(); |
} |
return 0; |
} |
@@ -293,52 +325,51 @@ const CSSSelector* RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelec |
// As we encounter a descendant type of combinator, the features only need to be checked |
// against descendants in the same subtree only. Hence wholeSubtree is reset to false. |
+void RuleFeatureSet::addFeaturesToInvalidationSet(DescendantInvalidationSet& invalidationSet, const InvalidationSetFeatures& features) |
+{ |
+ if (features.treeBoundaryCrossing) |
+ invalidationSet.setTreeBoundaryCrossing(); |
+ if (features.insertionPointCrossing) |
+ invalidationSet.setInsertionPointCrossing(); |
+ if (features.useSubtreeInvalidation()) { |
+ invalidationSet.setWholeSubtreeInvalid(); |
+ return; |
+ } |
+ if (!features.id.isEmpty()) |
+ invalidationSet.addId(features.id); |
+ if (!features.tagName.isEmpty()) |
+ invalidationSet.addTagName(features.tagName); |
+ for (const auto& className : features.classes) |
+ invalidationSet.addClass(className); |
+ for (const auto& attribute : features.attributes) |
+ invalidationSet.addAttribute(attribute); |
+ if (features.customPseudoElement) |
+ invalidationSet.setCustomPseudoInvalid(); |
+} |
+ |
void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector& selector, InvalidationSetFeatures& features) |
{ |
for (const CSSSelector* current = &selector; current; current = current->tagHistory()) { |
if (DescendantInvalidationSet* invalidationSet = invalidationSetForSelector(*current)) { |
- if (features.treeBoundaryCrossing) |
- invalidationSet->setTreeBoundaryCrossing(); |
- if (features.wholeSubtree) { |
- invalidationSet->setWholeSubtreeInvalid(); |
- } else { |
- if (!features.id.isEmpty()) |
- invalidationSet->addId(features.id); |
- if (!features.tagName.isEmpty()) |
- invalidationSet->addTagName(features.tagName); |
- for (Vector<AtomicString>::const_iterator it = features.classes.begin(); it != features.classes.end(); ++it) |
- invalidationSet->addClass(*it); |
- for (Vector<AtomicString>::const_iterator it = features.attributes.begin(); it != features.attributes.end(); ++it) |
- invalidationSet->addAttribute(*it); |
- if (features.customPseudoElement) |
- invalidationSet->setCustomPseudoInvalid(); |
- } |
+ addFeaturesToInvalidationSet(*invalidationSet, features); |
} else { |
- if (current->pseudoType() == CSSSelector::PseudoHost) |
+ if (current->isTreeBoundaryCrossing()) |
features.treeBoundaryCrossing = true; |
+ if (current->isInsertionPointCrossing()) |
+ features.insertionPointCrossing = true; |
if (const CSSSelectorList* selectorList = current->selectorList()) { |
- ASSERT(current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny || current->pseudoType() == CSSSelector::PseudoNot); |
for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) |
addFeaturesToInvalidationSets(*selector, features); |
} |
} |
- switch (current->relation()) { |
- case CSSSelector::SubSelector: |
- break; |
- case CSSSelector::ShadowPseudo: |
- case CSSSelector::ShadowDeep: |
+ |
+ if (current->relation() == CSSSelector::SubSelector) |
+ continue; |
+ |
+ if (current->isShadowSelector()) |
features.treeBoundaryCrossing = true; |
- features.wholeSubtree = false; |
- break; |
- case CSSSelector::Descendant: |
- case CSSSelector::Child: |
- features.wholeSubtree = false; |
- break; |
- case CSSSelector::DirectAdjacent: |
- case CSSSelector::IndirectAdjacent: |
- features.wholeSubtree = true; |
- break; |
- } |
+ |
+ features.adjacent = current->isAdjacentSelector(); |
} |
} |
@@ -349,10 +380,10 @@ void RuleFeatureSet::addContentAttr(const AtomicString& attributeName) |
void RuleFeatureSet::collectFeaturesFromRuleData(const RuleData& ruleData) |
{ |
- FeatureMetadata metadata; |
- InvalidationSetMode mode = updateInvalidationSets(ruleData.selector()); |
+ updateInvalidationSets(ruleData.selector()); |
- collectFeaturesFromSelector(ruleData.selector(), metadata, mode); |
+ FeatureMetadata metadata; |
+ collectFeaturesFromSelector(ruleData.selector(), metadata); |
m_metadata.add(metadata); |
if (metadata.foundSiblingSelector) |
@@ -393,17 +424,11 @@ DescendantInvalidationSet& RuleFeatureSet::ensurePseudoInvalidationSet(CSSSelect |
return *addResult.storedValue->value; |
} |
-void RuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& selector, RuleFeatureSet::FeatureMetadata& metadata, InvalidationSetMode mode) |
+void RuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& selector, RuleFeatureSet::FeatureMetadata& metadata) |
{ |
unsigned maxDirectAdjacentSelectors = 0; |
for (const CSSSelector* current = &selector; current; current = current->tagHistory()) { |
- if (mode != AddFeatures) { |
- if (DescendantInvalidationSet* invalidationSet = invalidationSetForSelector(*current)) { |
- if (mode == UseSubtreeStyleChange) |
- invalidationSet->setWholeSubtreeInvalid(); |
- } |
- } |
if (current->pseudoType() == CSSSelector::PseudoFirstLine) |
metadata.usesFirstLineRules = true; |
if (current->isDirectAdjacentSelector()) { |
@@ -416,24 +441,17 @@ void RuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& selector, Ru |
if (current->isSiblingSelector()) |
metadata.foundSiblingSelector = true; |
- collectFeaturesFromSelectorList(current->selectorList(), metadata, mode); |
+ const CSSSelectorList* selectorList = current->selectorList(); |
+ if (!selectorList) |
+ continue; |
- if (mode == UseLocalStyleChange && current->relation() != CSSSelector::SubSelector) |
- mode = UseSubtreeStyleChange; |
+ for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) |
+ collectFeaturesFromSelector(*selector, metadata); |
} |
ASSERT(!maxDirectAdjacentSelectors); |
} |
-void RuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList* selectorList, RuleFeatureSet::FeatureMetadata& metadata, InvalidationSetMode mode) |
-{ |
- if (!selectorList) |
- return; |
- |
- for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) |
- collectFeaturesFromSelector(*selector, metadata, mode); |
-} |
- |
void RuleFeatureSet::FeatureMetadata::add(const FeatureMetadata& other) |
{ |
usesFirstLineRules = usesFirstLineRules || other.usesFirstLineRules; |
@@ -449,14 +467,14 @@ void RuleFeatureSet::FeatureMetadata::clear() |
void RuleFeatureSet::add(const RuleFeatureSet& other) |
{ |
- for (InvalidationSetMap::const_iterator it = other.m_classInvalidationSets.begin(); it != other.m_classInvalidationSets.end(); ++it) |
- ensureClassInvalidationSet(it->key).combine(*it->value); |
- for (InvalidationSetMap::const_iterator it = other.m_attributeInvalidationSets.begin(); it != other.m_attributeInvalidationSets.end(); ++it) |
- ensureAttributeInvalidationSet(it->key).combine(*it->value); |
- for (InvalidationSetMap::const_iterator it = other.m_idInvalidationSets.begin(); it != other.m_idInvalidationSets.end(); ++it) |
- ensureIdInvalidationSet(it->key).combine(*it->value); |
- for (PseudoTypeInvalidationSetMap::const_iterator it = other.m_pseudoInvalidationSets.begin(); it != other.m_pseudoInvalidationSets.end(); ++it) |
- ensurePseudoInvalidationSet(static_cast<CSSSelector::PseudoType>(it->key)).combine(*it->value); |
+ for (const auto& it : other.m_classInvalidationSets) |
+ ensureClassInvalidationSet(it.key).combine(*it.value); |
+ for (const auto& it : other.m_attributeInvalidationSets) |
+ ensureAttributeInvalidationSet(it.key).combine(*it.value); |
+ for (const auto& it : other.m_idInvalidationSets) |
+ ensureIdInvalidationSet(it.key).combine(*it.value); |
+ for (const auto& it : other.m_pseudoInvalidationSets) |
+ ensurePseudoInvalidationSet(static_cast<CSSSelector::PseudoType>(it.key)).combine(*it.value); |
m_metadata.add(other.m_metadata); |