Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: Source/core/css/RuleFeature.cpp

Issue 652223002: Support style invalidation for ::content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing removal of PseudoContent case when moving. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/RuleFeature.h ('k') | Source/core/css/invalidation/DescendantInvalidationSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleFeature.cpp
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index b4d4bc3dbc210b307cbc7482f5c5e7b17bcf96dd..a4312b39b1afc827ef2cf2dc30f46dc0b7141c31 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -113,6 +113,7 @@ static bool supportsInvalidation(CSSSelector::PseudoType type)
case CSSSelector::PseudoInRange:
case CSSSelector::PseudoOutOfRange:
case CSSSelector::PseudoUnresolved:
+ case CSSSelector::PseudoContent:
case CSSSelector::PseudoHost:
case CSSSelector::PseudoShadow:
case CSSSelector::PseudoListBox:
@@ -175,7 +176,6 @@ static bool requiresSubtreeInvalidation(const CSSSelector& selector)
case CSSSelector::PseudoCue:
case CSSSelector::PseudoFutureCue:
case CSSSelector::PseudoPastCue:
- case CSSSelector::PseudoContent:
case CSSSelector::PseudoSpatialNavigationFocus:
// FIXME: Most pseudo classes/elements above can be supported and moved
// to assertSupportedPseudo(). Move on a case-by-case basis. If they
@@ -373,6 +373,8 @@ void RuleFeatureSet::addFeaturesToInvalidationSet(DescendantInvalidationSet& inv
{
if (features.treeBoundaryCrossing)
invalidationSet.setTreeBoundaryCrossing();
+ if (features.insertionPointCrossing)
+ invalidationSet.setInsertionPointCrossing();
if (features.adjacent) {
invalidationSet.setWholeSubtreeInvalid();
return;
@@ -395,8 +397,10 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector& selector,
if (DescendantInvalidationSet* invalidationSet = invalidationSetForSelector(*current)) {
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))
« no previous file with comments | « Source/core/css/RuleFeature.h ('k') | Source/core/css/invalidation/DescendantInvalidationSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698