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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp

Issue 2970623002: [WIP] Compute the linkMatchType inside the CSSSelectorParser.
Patch Set: [WIP] Compute the linkMatchType inside the CSSSelectorParser. Created 3 years, 5 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 | « third_party/WebKit/Source/core/css/parser/CSSParserSelector.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/parser/CSSSelectorParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
index 19174f62d5120ffa90e1905508febe3b17298ca0..22f9c7c67326c1e632012f1eae8dbb45f7884f4c 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
@@ -121,9 +121,10 @@ std::unique_ptr<CSSParserSelector> CSSSelectorParser::ConsumeComplexSelector(
while (CSSSelector::RelationType combinator = ConsumeCombinator(range)) {
std::unique_ptr<CSSParserSelector> next_selector =
ConsumeCompoundSelector(range);
- if (!next_selector)
+ if (!next_selector) {
return combinator == CSSSelector::kDescendant ? std::move(selector)
: nullptr;
+ }
if (previous_compound_flags & kHasPseudoElementForRightmostCompound)
return nullptr;
CSSParserSelector* end = next_selector.get();
@@ -141,6 +142,7 @@ std::unique_ptr<CSSParserSelector> CSSSelectorParser::ConsumeComplexSelector(
selector = std::move(next_selector);
}
+ selector->UpdateLinkMatchType();
return selector;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserSelector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698