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

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

Issue 1661453002: Setting page selector text should not allow brace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/CSSPageRuleTest.cpp ('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/CSSParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
index 2c92c9655cfced9be696aeeb8beb8fe40ea68f1c..413bbf7eb1e3a0fcc67b193d840e51f3255527e7 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
@@ -40,11 +40,7 @@ CSSSelectorList CSSParser::parseSelector(const CSSParserContext& context, StyleS
CSSSelectorList CSSParser::parsePageSelector(const CSSParserContext& context, StyleSheetContents* styleSheetContents, const String& selector)
{
CSSTokenizer::Scope scope(selector);
- CSSParserTokenRange range = scope.tokenRange();
- const CSSParserToken* preludeStart = &range.peek();
- while (!range.atEnd() && range.peek().type() != LeftBraceToken && range.peek().type() != SemicolonToken)
- range.consumeComponentValue();
- return CSSParserImpl::parsePageSelector(range.makeSubRange(preludeStart, &range.peek()), styleSheetContents);
+ return CSSParserImpl::parsePageSelector(scope.tokenRange(), styleSheetContents);
}
PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContext& context, StyleSheetContents* styleSheet, const String& rule)
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPageRuleTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698