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

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

Issue 171513006: Support invalidation sets for simple class selectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | « LayoutTests/virtual/targetedstylerecalc/fast/css/invalidation/targeted-class-style-invalidation-expected.txt ('k') | no next file » | 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 1395acf0e6f59aca9dfcef749802b97bc3626a39..82d741de855404aed1990d05ff6d7e40985153ae 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -54,7 +54,6 @@ static bool isSkippableComponentForInvalidation(const CSSSelector& selector)
static bool supportsClassDescendantInvalidation(const CSSSelector& selector)
{
bool foundDescendantRelation = false;
chrishtr 2014/02/19 17:50:44 remove these variables
rune 2014/02/19 18:47:40 See other comment.
- bool foundAncestorIdent = false;
bool foundIdent = false;
for (const CSSSelector* component = &selector; component; component = component->tagHistory()) {
@@ -65,8 +64,6 @@ static bool supportsClassDescendantInvalidation(const CSSSelector& selector)
if (component->m_match == CSSSelector::Class) {
if (!foundDescendantRelation)
foundIdent = true;
chrishtr 2014/02/19 17:50:44 return true, remove if (!foundDescendantRelation)
rune 2014/02/19 18:47:40 We still need to continue to look for adjacent com
chrishtr 2014/02/19 18:54:01 Oh right, good point.
- else
- foundAncestorIdent = true;
} else if (!isSkippableComponentForInvalidation(*component)) {
return false;
}
@@ -82,7 +79,7 @@ static bool supportsClassDescendantInvalidation(const CSSSelector& selector)
return false;
}
}
- return foundDescendantRelation && foundAncestorIdent && foundIdent;
+ return foundIdent;
chrishtr 2014/02/19 17:50:44 remove this line
rune 2014/02/19 18:47:40 See other comment.
}
void extractClassIdOrTag(const CSSSelector& selector, Vector<AtomicString>& classes, AtomicString& id, AtomicString& tagName)
« no previous file with comments | « LayoutTests/virtual/targetedstylerecalc/fast/css/invalidation/targeted-class-style-invalidation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698