OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "core/animation/DoubleStyleInterpolation.h" | 6 #include "core/animation/DoubleStyleInterpolation.h" |
7 | 7 |
8 #include "core/css/CSSCalculationValue.h" | 8 #include "core/css/CSSValueList.h" |
9 #include "core/css/resolver/StyleBuilder.h" | 9 #include "core/css/resolver/StyleBuilder.h" |
| 10 #include "core/style/ComputedStyleConstants.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 bool DoubleStyleInterpolation::canCreateFrom(const CSSValue& value) | 14 bool DoubleStyleInterpolation::canCreateFrom(const CSSValue& value) |
14 { | 15 { |
15 return value.isPrimitiveValue() && (toCSSPrimitiveValue(value).isNumber() ||
toCSSPrimitiveValue(value).isAngle()); | 16 return value.isPrimitiveValue() && (toCSSPrimitiveValue(value).isNumber() ||
toCSSPrimitiveValue(value).isAngle()); |
16 } | 17 } |
17 | 18 |
18 PassOwnPtrWillBeRawPtr<InterpolableValue> DoubleStyleInterpolation::doubleToInte
rpolableValue(const CSSValue& value) | 19 PassOwnPtrWillBeRawPtr<InterpolableValue> DoubleStyleInterpolation::doubleToInte
rpolableValue(const CSSValue& value) |
19 { | 20 { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 || startRotationType != endRotationType) | 152 || startRotationType != endRotationType) |
152 return nullptr; | 153 return nullptr; |
153 | 154 |
154 return adoptRefWillBeNoop(new DoubleStyleInterpolation( | 155 return adoptRefWillBeNoop(new DoubleStyleInterpolation( |
155 motionRotationToInterpolableValue(start), | 156 motionRotationToInterpolableValue(start), |
156 motionRotationToInterpolableValue(end), | 157 motionRotationToInterpolableValue(end), |
157 id, true, InterpolationRange::RangeAll, startRotationType == MotionRotat
ionAuto)); | 158 id, true, InterpolationRange::RangeAll, startRotationType == MotionRotat
ionAuto)); |
158 } | 159 } |
159 | 160 |
160 } | 161 } |
OLD | NEW |