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

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

Issue 1574323003: Split compound selector after consume finished. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upload-base
Patch Set: Removed obsolete serialization hack and fixed unit tests. 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 425fc784e8edda35effaefa7a2e2f052e23ff395..707fdc24b81052db297d430a8aab38ebba6c539f 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp
@@ -405,6 +405,10 @@ RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelector& selector, Inva
continue;
features.treeBoundaryCrossing = current->isShadowSelector();
+ if (current->relationIsAffectedByPseudoContent()) {
+ features.contentPseudoCrossing = true;
+ features.insertionPointCrossing = true;
+ }
features.adjacent = current->isAdjacentSelector();
if (current->relation() == CSSSelector::DirectAdjacent)
features.maxDirectAdjacentSelectors = 1;
@@ -473,11 +477,8 @@ 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))
@@ -488,9 +489,12 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector* selector,
if (current->relation() == CSSSelector::SubSelector)
continue;
+ if (current->relationIsAffectedByPseudoContent()) {
+ descendantFeatures.insertionPointCrossing = true;
+ descendantFeatures.contentPseudoCrossing = true;
+ }
if (current->isShadowSelector())
descendantFeatures.treeBoundaryCrossing = true;
-
if (!current->isAdjacentSelector()) {
lastCompoundSelectorInAdjacentChain = current->tagHistory();
siblingFeatures = nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.cpp ('k') | third_party/WebKit/Source/core/css/RuleSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698