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

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

Issue 985023003: Don't accept <string> for text-align (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't construct CSSPrimitiveValue for text-align <string> Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 1e5526450dc163a9ac2d984ccd298efac6ab5536..52ef85d3c551b66e3d5b95d0a3287260ca5c2d88 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -391,8 +391,6 @@ inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPr
{
if (identifier)
return cssValuePool().createIdentifierValue(identifier);
- if (value->unit == CSSPrimitiveValue::CSS_STRING)
- return createPrimitiveCustomIdentValue(value);
if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
return createPrimitiveNumericValue(value);
if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_CHS)
@@ -528,9 +526,10 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyTextAlign:
// left | right | center | justify | -webkit-left | -webkit-right | -webkit-center | -webkit-match-parent
// | start | end | <string> | inherit | -webkit-auto (converted to start)
- if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitMatchParent) || id == CSSValueStart || id == CSSValueEnd
- || value->unit == CSSPrimitiveValue::CSS_STRING)
+ // FIXME: <string> not supported right now
+ if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitMatchParent) || id == CSSValueStart || id == CSSValueEnd) {
validPrimitive = true;
+ }
break;
case CSSPropertyFontWeight: { // normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit
@@ -2179,7 +2178,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseQuotes()
RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
if (val->unit != CSSPrimitiveValue::CSS_STRING)
return nullptr;
- parsedValue = CSSPrimitiveValue::create(val->string, CSSPrimitiveValue::CSS_STRING);
+ parsedValue = createPrimitiveStringValue(val);
values->append(parsedValue.release());
m_valueList->next();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698