Chromium Code Reviews| 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; |
| } |
| } |