| Index: Source/core/css/parser/CSSSelectorParser.cpp
|
| diff --git a/Source/core/css/parser/CSSSelectorParser.cpp b/Source/core/css/parser/CSSSelectorParser.cpp
|
| index 418544ee70e32a76acfff019803f5a167fe22114..ce97d983bf94dcff6d9853443ddf33ec720c5887 100644
|
| --- a/Source/core/css/parser/CSSSelectorParser.cpp
|
| +++ b/Source/core/css/parser/CSSSelectorParser.cpp
|
| @@ -129,8 +129,11 @@ PassOwnPtr<CSSParserSelector> CSSSelectorParser::consumeComplexSelector(CSSParse
|
| return nullptr;
|
| while (CSSSelector::Relation combinator = consumeCombinator(range)) {
|
| OwnPtr<CSSParserSelector> nextSelector = consumeCompoundSelector(range);
|
| - if (!nextSelector)
|
| - return combinator == CSSSelector::Descendant ? selector.release() : nullptr;
|
| + if (!nextSelector) {
|
| + if (combinator != CSSSelector::Descendant)
|
| + return nullptr;
|
| + break;
|
| + }
|
| CSSParserSelector* end = nextSelector.get();
|
| while (end->tagHistory())
|
| end = end->tagHistory();
|
| @@ -142,6 +145,7 @@ PassOwnPtr<CSSParserSelector> CSSSelectorParser::consumeComplexSelector(CSSParse
|
| selector = nextSelector.release();
|
| }
|
|
|
| + selector->updateLinkMatchType();
|
| return selector.release();
|
| }
|
|
|
|
|