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

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

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.h
diff --git a/third_party/WebKit/Source/core/svg/SVGLength.h b/third_party/WebKit/Source/core/svg/SVGLength.h
index dc17da63b7dd8a0287e64bd0480698b836db37f5..d1463e64eb81594fad54d194dd14695296510271 100644
--- a/third_party/WebKit/Source/core/svg/SVGLength.h
+++ b/third_party/WebKit/Source/core/svg/SVGLength.h
@@ -87,7 +87,8 @@ public:
|| unitType == CSSPrimitiveValue::UnitType::Ems
|| unitType == CSSPrimitiveValue::UnitType::Exs
|| unitType == CSSPrimitiveValue::UnitType::Rems
- || unitType == CSSPrimitiveValue::UnitType::Chs;
+ || unitType == CSSPrimitiveValue::UnitType::Chs
+ || (unitType >= CSSPrimitiveValue::UnitType::ViewportWidth && unitType <= CSSPrimitiveValue::UnitType::ViewportMax);
}
inline bool isRelative() const { return isRelativeUnit(m_value->typeWithCalcResolved()); }
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | third_party/WebKit/Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698