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

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

Issue 1824283002: Ensure that we don't allow 'normal' alongside other values in content property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index c0049bd1d317bebfea3b367c02af5217b56fc15f..eb498c8fce6855d316e419bbd2d26ad9f656d2cc 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -2325,14 +2325,17 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeCounterContent(CSSParserTokenRang
return CSSCounterValue::create(identifier.release(), listStyle.release(), separator.release());
}
-static PassRefPtrWillBeRawPtr<CSSValueList> consumeContent(CSSParserTokenRange& range, CSSParserContext context)
+static PassRefPtrWillBeRawPtr<CSSValue> consumeContent(CSSParserTokenRange& range, CSSParserContext context)
{
+ if (identMatches<CSSValueNormal>(range.peek().id()))
+ return consumeIdent(range);
+
RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
do {
RefPtrWillBeRawPtr<CSSValue> parsedValue = consumeImage(range, context);
if (!parsedValue)
- parsedValue = consumeIdent<CSSValueOpenQuote, CSSValueCloseQuote, CSSValueNoOpenQuote, CSSValueNoCloseQuote, CSSValueNormal>(range);
+ parsedValue = consumeIdent<CSSValueOpenQuote, CSSValueCloseQuote, CSSValueNoOpenQuote, CSSValueNoCloseQuote>(range);
if (!parsedValue)
parsedValue = consumeString(range);
if (!parsedValue) {

Powered by Google App Engine
This is Rietveld 408576698