| 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 {
|
|
|