| Index: third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| index cdaadc631d0c8a00a7fc42f82ddb8e796a54ccfe..0bb78e13d797d231357a19f72a1ad918151ff686 100644
|
| --- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| @@ -105,6 +105,18 @@ void CSSLengthInterpolationType::composite(
|
| underlyingNonInterpolableValue = CSSLengthNonInterpolableValue::merge(underlyingNonInterpolableValue.get(), nonInterpolableValue);
|
| }
|
|
|
| +void CSSLengthInterpolationType::subtractFromOneHundredPercent(InterpolationValue& result)
|
| +{
|
| + InterpolableList& list = toInterpolableList(*result.interpolableValue);
|
| + for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++) {
|
| + double value = -toInterpolableNumber(*list.get(i)).value();
|
| + if (i == CSSPrimitiveValue::UnitTypePercentage)
|
| + value += 100;
|
| + toInterpolableNumber(*list.getMutable(i)).set(value);
|
| + }
|
| + result.nonInterpolableValue = CSSLengthNonInterpolableValue::create(true);
|
| +}
|
| +
|
| InterpolationValue CSSLengthInterpolationType::maybeConvertCSSValue(const CSSValue& value)
|
| {
|
| if (!value.isPrimitiveValue())
|
|
|