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

Unified Diff: Source/core/svg/SVGLength.h

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 | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLength.h
diff --git a/Source/core/svg/SVGLength.h b/Source/core/svg/SVGLength.h
index 50de4436c854b1c5e15b342c41382a6bddbca9f6..3d2fe9e4f412e203f1afc9af25ef1ebc904ca951 100644
--- a/Source/core/svg/SVGLength.h
+++ b/Source/core/svg/SVGLength.h
@@ -55,6 +55,10 @@ public:
{
if (m_unitType == LengthTypeNumber)
return CSSPrimitiveValue::UnitType::CSS_PX;
+
+ if (m_unitType == LengthTypeREMS)
+ return CSSPrimitiveValue::UnitType::CSS_REMS;
+
return static_cast<CSSPrimitiveValue::UnitType>(m_unitType);
}
void setUnitType(SVGLengthType);
@@ -89,7 +93,8 @@ public:
{
return unitType == LengthTypePercentage
|| unitType == LengthTypeEMS
- || unitType == LengthTypeEXS;
+ || unitType == LengthTypeEXS
+ || unitType == LengthTypeREMS;
}
inline bool isRelative() const { return isRelativeUnit(unitType()); }
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698