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 29b6bf2e67ec83eb4032dca12989053576860714..b870c60f80302cfbee3cbb0058823d95f4da8048 100644 |
--- a/third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp |
+++ b/third_party/WebKit/Source/core/animation/SVGLengthInterpolationType.cpp |
@@ -103,11 +103,18 @@ std::unique_ptr<InterpolableValue> SVGLengthInterpolationType::neutralInterpolab |
InterpolationValue SVGLengthInterpolationType::convertSVGLength(const SVGLength& length) |
{ |
- double value = length.valueInSpecifiedUnits(); |
- LengthInterpolatedUnit unitType = convertToInterpolatedUnit(length.typeWithCalcResolved(), value); |
+ const CSSPrimitiveValue* primitiveValue = length.asCSSPrimitiveValue(); |
+ |
+ CSSLengthArray lengthArray; |
+ primitiveValue->accumulateLengthArray(lengthArray); |
double values[numLengthInterpolatedUnits] = { }; |
- values[unitType] = value; |
+ |
+ for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++) { |
+ double value = lengthArray.values[i]; |
+ LengthInterpolatedUnit unitType = convertToInterpolatedUnit(SVGLength::toUnitType(i), value); |
fs
2016/07/16 21:13:02
Couldn't we take this opportunity to transition to
Shanmuga Pandi
2016/07/18 13:35:32
That's good thought.. :)
Done!!
fs
2016/07/18 13:56:48
Looks great, thanks!
|
+ values[unitType] = value; |
+ } |
std::unique_ptr<InterpolableList> listOfValues = InterpolableList::create(numLengthInterpolatedUnits); |
for (size_t i = 0; i < numLengthInterpolatedUnits; ++i) |