Index: third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp |
diff --git a/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp |
index 2aeb6d294c31527ba17de6d0d1428d1afec6a6a2..93d79823aaaa3af4b6158a7f75e8120fd7e84fad 100644 |
--- a/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp |
+++ b/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp |
@@ -12,34 +12,17 @@ |
namespace blink { |
-InterpolationValue CSSPositionAxisListInterpolationType::convertPositionAxisCSSValue(const CSSValue& value) |
+static InterpolationValue convertPositionAxisCSSValue(const CSSValue& value) |
{ |
- if (value.isValuePair()) { |
- const CSSValuePair& pair = toCSSValuePair(value); |
- InterpolationValue result = CSSLengthInterpolationType::maybeConvertCSSValue(pair.second()); |
- CSSValueID side = toCSSPrimitiveValue(pair.first()).getValueID(); |
- if (side == CSSValueRight || side == CSSValueBottom) |
- CSSLengthInterpolationType::subtractFromOneHundredPercent(result); |
- return result; |
- } |
- |
- const CSSPrimitiveValue& primitveValue = toCSSPrimitiveValue(value); |
- if (!primitveValue.isValueID()) |
+ if (!value.isValuePair()) |
return CSSLengthInterpolationType::maybeConvertCSSValue(value); |
- switch (primitveValue.getValueID()) { |
- case CSSValueLeft: |
- case CSSValueTop: |
- return CSSLengthInterpolationType::createInterpolablePercent(0); |
- case CSSValueRight: |
- case CSSValueBottom: |
- return CSSLengthInterpolationType::createInterpolablePercent(100); |
- case CSSValueCenter: |
- return CSSLengthInterpolationType::createInterpolablePercent(50); |
- default: |
- ASSERT_NOT_REACHED(); |
- return nullptr; |
- } |
+ const CSSValuePair& pair = toCSSValuePair(value); |
+ InterpolationValue result = CSSLengthInterpolationType::maybeConvertCSSValue(pair.second()); |
+ CSSValueID side = toCSSPrimitiveValue(pair.first()).getValueID(); |
+ if (side == CSSValueRight || side == CSSValueBottom) |
+ CSSLengthInterpolationType::subtractFromOneHundredPercent(result); |
+ return result; |
} |
InterpolationValue CSSPositionAxisListInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState&, ConversionCheckers&) const |