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

Unified Diff: Source/core/css/parser/CSSParser.cpp

Issue 790593004: CSS Parser: Implement selector parsing [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 6 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 | « Source/core/core.gypi ('k') | Source/core/css/parser/CSSParserTokenRange.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSParser.cpp
diff --git a/Source/core/css/parser/CSSParser.cpp b/Source/core/css/parser/CSSParser.cpp
index 6174c14a11e4c4c01ac629d4c2167853fce9d33f..e0ec43d22b33dc96d471ace610f5cbeb7d95fb4b 100644
--- a/Source/core/css/parser/CSSParser.cpp
+++ b/Source/core/css/parser/CSSParser.cpp
@@ -11,6 +11,8 @@
#include "core/css/StyleSheetContents.h"
#include "core/css/parser/CSSParserFastPaths.h"
#include "core/css/parser/CSSParserImpl.h"
+#include "core/css/parser/CSSSelectorParser.h"
+#include "core/css/parser/CSSTokenizer.h"
namespace blink {
@@ -29,6 +31,12 @@ bool CSSParser::parseDeclaration(MutableStylePropertySet* propertySet, const Str
void CSSParser::parseSelector(const String& selector, CSSSelectorList& selectorList)
{
+ if (RuntimeEnabledFeatures::newCSSParserEnabled()) {
+ Vector<CSSParserToken> tokens;
+ CSSTokenizer::tokenize(selector, tokens);
+ CSSSelectorParser::parseSelector(tokens, m_bisonParser.m_context, selectorList);
+ return;
+ }
m_bisonParser.parseSelector(selector, selectorList);
}
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/parser/CSSParserTokenRange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698