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

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

Issue 2588103003: Rename blink::SelectorChecker::Match enum type to MatchStatus. (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/Source/core/css/SelectorChecker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/SelectorChecker.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index adbdbc8dfa97cf42508c9ddcf315c30f7ee64eb8..d2a1bbbfc51c08c2bc8a0d9384afb0928c66b733 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -200,7 +200,7 @@ static bool isLastOfType(Element& element, const QualifiedName& type) {
// * SelectorFailsAllSiblings - the selector fails for e and any sibling of e
// * SelectorFailsCompletely - the selector fails for e and any sibling or
// ancestor of e
-SelectorChecker::Match SelectorChecker::matchSelector(
+SelectorChecker::MatchStatus SelectorChecker::matchSelector(
const SelectorCheckingContext& context,
MatchResult& result) const {
MatchResult subResult;
@@ -218,7 +218,7 @@ SelectorChecker::Match SelectorChecker::matchSelector(
return SelectorFailsLocally;
}
- Match match;
+ MatchStatus match;
if (context.selector->relation() != CSSSelector::SubSelector) {
if (nextSelectorExceedsScope(context))
return SelectorFailsCompletely;
@@ -246,7 +246,7 @@ prepareNextContextForRelation(
return nextContext;
}
-SelectorChecker::Match SelectorChecker::matchForSubSelector(
+SelectorChecker::MatchStatus SelectorChecker::matchForSubSelector(
const SelectorCheckingContext& context,
MatchResult& result) const {
SelectorCheckingContext nextContext = prepareNextContextForRelation(context);
@@ -266,7 +266,7 @@ static inline bool isV0ShadowRoot(const Node* node) {
toShadowRoot(node)->type() == ShadowRootType::V0;
}
-SelectorChecker::Match SelectorChecker::matchForPseudoShadow(
+SelectorChecker::MatchStatus SelectorChecker::matchForPseudoShadow(
const SelectorCheckingContext& context,
const ContainerNode* node,
MatchResult& result) const {
@@ -293,7 +293,7 @@ static inline Element* parentOrOpenShadowHostElement(const Element& element) {
return element.parentOrShadowHostElement();
}
-SelectorChecker::Match SelectorChecker::matchForRelation(
+SelectorChecker::MatchStatus SelectorChecker::matchForRelation(
const SelectorCheckingContext& context,
MatchResult& result) const {
SelectorCheckingContext nextContext = prepareNextContextForRelation(context);
@@ -330,7 +330,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(
for (nextContext.element = parentElement(context); nextContext.element;
nextContext.element = parentElement(nextContext)) {
- Match match = matchSelector(nextContext, result);
+ MatchStatus match = matchSelector(nextContext, result);
if (match == SelectorMatches || match == SelectorFailsCompletely)
return match;
if (nextSelectorExceedsScope(nextContext))
@@ -379,7 +379,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(
for (; nextContext.element;
nextContext.element =
ElementTraversal::previousSibling(*nextContext.element)) {
- Match match = matchSelector(nextContext, result);
+ MatchStatus match = matchSelector(nextContext, result);
if (match == SelectorMatches || match == SelectorFailsAllSiblings ||
match == SelectorFailsCompletely)
return match;
@@ -434,7 +434,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(
nextContext.element;
nextContext.element =
parentOrV0ShadowHostElement(*nextContext.element)) {
- Match match = matchSelector(nextContext, result);
+ MatchStatus match = matchSelector(nextContext, result);
if (match == SelectorMatches && context.element->isInShadowTree())
UseCounter::count(context.element->document(),
UseCounter::CSSDeepCombinatorAndShadow);
@@ -459,7 +459,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(
nextContext.element;
nextContext.element =
parentOrOpenShadowHostElement(*nextContext.element)) {
- Match match = matchSelector(nextContext, result);
+ MatchStatus match = matchSelector(nextContext, result);
if (match == SelectorMatches || match == SelectorFailsCompletely)
return match;
if (nextSelectorExceedsScope(nextContext))
@@ -484,7 +484,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(
return SelectorFailsCompletely;
}
-SelectorChecker::Match SelectorChecker::matchForPseudoContent(
+SelectorChecker::MatchStatus SelectorChecker::matchForPseudoContent(
const SelectorCheckingContext& context,
const Element& element,
MatchResult& result) const {
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698