| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/animation/BasicShapeInterpolationFunctions.h" | 5 #include "core/animation/BasicShapeInterpolationFunctions.h" |
| 6 | 6 |
| 7 #include "core/animation/CSSPositionAxisListInterpolationType.h" | 7 #include "core/animation/CSSPositionAxisListInterpolationType.h" |
| 8 #include "core/animation/LengthInterpolationFunctions.h" | 8 #include "core/animation/LengthInterpolationFunctions.h" |
| 9 #include "core/css/CSSBasicShapeValues.h" | 9 #include "core/css/CSSBasicShapeValues.h" |
| 10 #include "core/css/resolver/StyleResolverState.h" | 10 #include "core/css/resolver/StyleResolverState.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 BasicShapeCenterCoordinate createCoordinate( | 101 BasicShapeCenterCoordinate createCoordinate( |
| 102 const InterpolableValue& interpolableValue, | 102 const InterpolableValue& interpolableValue, |
| 103 const CSSToLengthConversionData& conversionData) { | 103 const CSSToLengthConversionData& conversionData) { |
| 104 return BasicShapeCenterCoordinate( | 104 return BasicShapeCenterCoordinate( |
| 105 BasicShapeCenterCoordinate::TopLeft, | 105 BasicShapeCenterCoordinate::TopLeft, |
| 106 LengthInterpolationFunctions::createLength( | 106 LengthInterpolationFunctions::createLength( |
| 107 interpolableValue, nullptr, conversionData, ValueRangeAll)); | 107 interpolableValue, nullptr, conversionData, ValueRangeAll)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 std::unique_ptr<InterpolableValue> convertCSSRadius( | 110 std::unique_ptr<InterpolableValue> convertCSSRadius(const CSSValue* radius) { |
| 111 const CSSPrimitiveValue* radius) { | 111 if (!radius || radius->isIdentifierValue()) |
| 112 if (!radius || radius->isValueID()) | |
| 113 return nullptr; | 112 return nullptr; |
| 114 return unwrap(LengthInterpolationFunctions::maybeConvertCSSValue(*radius)); | 113 return unwrap(LengthInterpolationFunctions::maybeConvertCSSValue(*radius)); |
| 115 } | 114 } |
| 116 | 115 |
| 117 std::unique_ptr<InterpolableValue> convertRadius(const BasicShapeRadius& radius, | 116 std::unique_ptr<InterpolableValue> convertRadius(const BasicShapeRadius& radius, |
| 118 double zoom) { | 117 double zoom) { |
| 119 if (radius.type() != BasicShapeRadius::Value) | 118 if (radius.type() != BasicShapeRadius::Value) |
| 120 return nullptr; | 119 return nullptr; |
| 121 return unwrap( | 120 return unwrap( |
| 122 LengthInterpolationFunctions::maybeConvertLength(radius.value(), zoom)); | 121 LengthInterpolationFunctions::maybeConvertLength(radius.value(), zoom)); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 case BasicShape::BasicShapePolygonType: | 585 case BasicShape::BasicShapePolygonType: |
| 587 return PolygonFunctions::createBasicShape( | 586 return PolygonFunctions::createBasicShape( |
| 588 interpolableValue, nonInterpolableValue, conversionData); | 587 interpolableValue, nonInterpolableValue, conversionData); |
| 589 default: | 588 default: |
| 590 NOTREACHED(); | 589 NOTREACHED(); |
| 591 return nullptr; | 590 return nullptr; |
| 592 } | 591 } |
| 593 } | 592 } |
| 594 | 593 |
| 595 } // namespace blink | 594 } // namespace blink |
| OLD | NEW |