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

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

Issue 973623002: Fix serialization of content property to always quote (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix final test Created 5 years, 10 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: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 68300c70665e606921cde5d9489b7f27b538a455..5c521e86e04df9bac4ea6aee5c7c50f6f02abf3d 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -320,10 +320,10 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNume
return cssValuePool().createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitType>(value->unit));
}
-inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveStringValue(CSSParserValue* value)
+inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveStringValue(CSSParserValue* value, CSSPrimitiveValue::UnitType type)
{
ASSERT(value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_IDENT);
- return cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING);
+ return cssValuePool().createValue(value->string, type);
}
inline PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWithReferrer(const String& rawValue, const KURL& url)
@@ -2221,7 +2221,7 @@ bool CSSPropertyParser::parseContent(CSSPropertyID propId, bool important)
break;
}
} else if (val->unit == CSSPrimitiveValue::CSS_STRING) {
- parsedValue = createPrimitiveStringValue(val);
+ parsedValue = createPrimitiveStringValue(val, CSSPrimitiveValue::CSS_STRING);
}
if (!parsedValue)
break;
@@ -3263,7 +3263,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
// For the <custom-ident> case.
if (gridLineName && !numericValue && !hasSeenSpanKeyword)
- return cssValuePool().createValue(gridLineName->getStringValue(), CSSPrimitiveValue::CSS_STRING);
+ return cssValuePool().createValue(gridLineName->getStringValue(), CSSPrimitiveValue::CSS_CUSTOM_IDENT);
RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
if (hasSeenSpanKeyword)
@@ -3851,7 +3851,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParse
RefPtrWillBeRawPtr<CSSPrimitiveValue> separator = nullptr;
if (!counters)
- separator = cssValuePool().createValue(String(), CSSPrimitiveValue::CSS_STRING);
+ separator = cssValuePool().createValue(String(), CSSPrimitiveValue::CSS_CUSTOM_IDENT);
else {
args->next();
if (!consumeComma(args))
« Source/core/css/LayoutStyleCSSValueMapping.cpp ('K') | « Source/core/css/parser/CSSPropertyParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698