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

Unified Diff: third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp

Issue 2130753003: Support viewport units for SVG Length animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/animation/SVGLengthInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp
index 54e47b41ea9de408c83311e72e5b44cb2f56d3fc..36aa66a27044c1acf99085d812554b42b0f753f9 100644
--- a/third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp
@@ -23,6 +23,10 @@ enum LengthInterpolatedUnit {
LengthInterpolatedEXS,
LengthInterpolatedREMS,
LengthInterpolatedCHS,
+ LengthInterpolatedViewportWidth,
+ LengthInterpolatedViewportHeight,
+ LengthInterpolatedViewportMin,
+ LengthInterpolatedViewportMax,
};
static const CSSPrimitiveValue::UnitType unitTypes[] = {
@@ -31,7 +35,11 @@ static const CSSPrimitiveValue::UnitType unitTypes[] = {
CSSPrimitiveValue::UnitType::Ems,
CSSPrimitiveValue::UnitType::Exs,
CSSPrimitiveValue::UnitType::Rems,
- CSSPrimitiveValue::UnitType::Chs
+ CSSPrimitiveValue::UnitType::Chs,
+ CSSPrimitiveValue::UnitType::ViewportWidth,
+ CSSPrimitiveValue::UnitType::ViewportHeight,
+ CSSPrimitiveValue::UnitType::ViewportMin,
+ CSSPrimitiveValue::UnitType::ViewportMax
alancutter (OOO until 2018) 2016/07/11 06:28:35 Nit: Let's add a trailing comma here to be consist
Shanmuga Pandi 2016/07/12 06:44:03 Done.
};
const size_t numLengthInterpolatedUnits = WTF_ARRAY_LENGTH(unitTypes);
@@ -71,6 +79,14 @@ LengthInterpolatedUnit convertToInterpolatedUnit(CSSPrimitiveValue::UnitType uni
return LengthInterpolatedREMS;
case CSSPrimitiveValue::UnitType::Chs:
return LengthInterpolatedCHS;
+ case CSSPrimitiveValue::UnitType::ViewportWidth:
+ return LengthInterpolatedViewportWidth;
+ case CSSPrimitiveValue::UnitType::ViewportHeight:
+ return LengthInterpolatedViewportHeight;
+ case CSSPrimitiveValue::UnitType::ViewportMin:
+ return LengthInterpolatedViewportMin;
+ case CSSPrimitiveValue::UnitType::ViewportMax:
+ return LengthInterpolatedViewportMax;
}
}

Powered by Google App Engine
This is Rietveld 408576698