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

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

Issue 1544893003: Don't add rule features across ::content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused method Created 4 years, 11 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
Index: third_party/WebKit/Source/core/css/RuleFeature.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleFeature.cpp b/third_party/WebKit/Source/core/css/RuleFeature.cpp
index 76f9b60c3b773d6ff67988f73955cd478a5e8adf..425fc784e8edda35effaefa7a2e2f052e23ff395 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp
@@ -428,10 +428,11 @@ void RuleFeatureSet::addFeaturesToInvalidationSet(InvalidationSet& invalidationS
invalidationSet.setTreeBoundaryCrossing();
if (features.insertionPointCrossing)
invalidationSet.setInsertionPointCrossing();
- if (features.forceSubtree) {
+ if (features.forceSubtree)
invalidationSet.setWholeSubtreeInvalid();
+ if (features.contentPseudoCrossing || features.forceSubtree)
return;
- }
+
if (!features.id.isEmpty())
invalidationSet.addId(features.id);
if (!features.tagName.isEmpty())
@@ -472,8 +473,11 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector* selector,
} else {
if (current->isHostPseudoClass())
descendantFeatures.treeBoundaryCrossing = true;
- if (current->isInsertionPointCrossing())
+ if (current->isInsertionPointCrossing()) {
descendantFeatures.insertionPointCrossing = true;
+ if (current->pseudoType() == CSSSelector::PseudoContent)
+ descendantFeatures.contentPseudoCrossing = true;
+ }
if (const CSSSelectorList* selectorList = current->selectorList()) {
ASSERT(supportsInvalidationWithSelectorList(current->pseudoType()));
for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = CSSSelectorList::next(*subSelector))
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.h ('k') | third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698