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

Unified Diff: third_party/WebKit/Source/core/svg/SVGLength.cpp

Issue 1544543003: Adding support of viewport units to SVG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Align with review comments Created 4 years, 11 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/svg/SVGLength.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGLength.cpp b/third_party/WebKit/Source/core/svg/SVGLength.cpp
index 924008740a21cea8529aa362278de5ee99d5ebba..1302a03035d5dc0eec1ebf0723b8b2b275b89bd1 100644
--- a/third_party/WebKit/Source/core/svg/SVGLength.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGLength.cpp
@@ -102,7 +102,8 @@ bool isSupportedCSSUnitType(CSSPrimitiveValue::UnitType type)
return type != CSSPrimitiveValue::UnitType::Unknown
&& (type <= CSSPrimitiveValue::UnitType::UserUnits
|| type == CSSPrimitiveValue::UnitType::Chs
- || type == CSSPrimitiveValue::UnitType::Rems);
+ || type == CSSPrimitiveValue::UnitType::Rems
+ || (type >= CSSPrimitiveValue::UnitType::ViewportWidth && type <= CSSPrimitiveValue::UnitType::ViewportMax));
}
void SVGLength::setUnitType(CSSPrimitiveValue::UnitType type)
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLength.h ('k') | third_party/WebKit/Source/core/svg/SVGLengthContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698