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

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

Issue 1031223003: SVG doesn't recognize rem units (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes builderror Created 5 years, 8 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 | « LayoutTests/svg/stroke/stroke-width-rem-type-expected.svg ('k') | Source/core/svg/SVGLength.h » ('j') | 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 0329919790cbd0f683b2aa50737901cd1235bf96..02e08bccad29329181b1725652d0b9ec9639d999 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -8145,6 +8145,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
parsedValue = CSSPrimitiveValue::create(value->string, (CSSPrimitiveValue::UnitType) value->unit);
else if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
parsedValue = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitType) value->unit);
+ else if (value->unit == CSSPrimitiveValue::CSS_REMS)
+ parsedValue = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitType)value->unit);
else if (value->unit >= CSSParserValue::Q_EMS)
parsedValue = CSSPrimitiveValue::createAllowingMarginQuirk(value->fValue, CSSPrimitiveValue::CSS_EMS);
if (isCalculation(value)) {
@@ -8175,6 +8177,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSVGStrokeDasharray()
ret->append(CSSPrimitiveValue::createIdentifier(value->id));
else if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
ret->append(CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitType) value->unit));
+ else if (value->unit == CSSPrimitiveValue::CSS_REMS)
+ ret->append(CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitType)value->unit));
value = m_valueList->next();
bool commaConsumed = consumeComma(m_valueList);
value = m_valueList->current();
« no previous file with comments | « LayoutTests/svg/stroke/stroke-width-rem-type-expected.svg ('k') | Source/core/svg/SVGLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698