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/CSSTransformInterpolationType.h" | 5 #include "core/animation/CSSTransformInterpolationType.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/animation/LengthUnitsChecker.h" | 8 #include "core/animation/LengthUnitsChecker.h" |
8 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 10 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/CSSValueList.h" | 11 #include "core/css/CSSValueList.h" |
11 #include "core/css/resolver/StyleResolverState.h" | 12 #include "core/css/resolver/StyleResolverState.h" |
12 #include "core/css/resolver/TransformBuilder.h" | 13 #include "core/css/resolver/TransformBuilder.h" |
13 #include "platform/transforms/TransformOperations.h" | 14 #include "platform/transforms/TransformOperations.h" |
14 #include "platform/transforms/TranslateTransformOperation.h" | 15 #include "platform/transforms/TranslateTransformOperation.h" |
15 #include "wtf/PtrUtil.h" | 16 #include "wtf/PtrUtil.h" |
16 #include <memory> | |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 class CSSTransformNonInterpolableValue : public NonInterpolableValue { | 20 class CSSTransformNonInterpolableValue : public NonInterpolableValue { |
21 public: | 21 public: |
22 static PassRefPtr<CSSTransformNonInterpolableValue> create( | 22 static PassRefPtr<CSSTransformNonInterpolableValue> create( |
23 TransformOperations&& transform) { | 23 TransformOperations&& transform) { |
24 return adoptRef(new CSSTransformNonInterpolableValue( | 24 return adoptRef(new CSSTransformNonInterpolableValue( |
25 true, std::move(transform), EmptyTransformOperations(), false, false)); | 25 true, std::move(transform), EmptyTransformOperations(), false, false)); |
26 } | 26 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 const NonInterpolableValue* untypedNonInterpolableValue, | 252 const NonInterpolableValue* untypedNonInterpolableValue, |
253 StyleResolverState& state) const { | 253 StyleResolverState& state) const { |
254 double progress = toInterpolableNumber(interpolableValue).value(); | 254 double progress = toInterpolableNumber(interpolableValue).value(); |
255 const CSSTransformNonInterpolableValue& nonInterpolableValue = | 255 const CSSTransformNonInterpolableValue& nonInterpolableValue = |
256 toCSSTransformNonInterpolableValue(*untypedNonInterpolableValue); | 256 toCSSTransformNonInterpolableValue(*untypedNonInterpolableValue); |
257 state.style()->setTransform( | 257 state.style()->setTransform( |
258 nonInterpolableValue.getInterpolatedTransform(progress)); | 258 nonInterpolableValue.getInterpolatedTransform(progress)); |
259 } | 259 } |
260 | 260 |
261 } // namespace blink | 261 } // namespace blink |
OLD | NEW |