OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef SVGLengthStyleInterpolation_h | 5 #ifndef SVGLengthStyleInterpolation_h |
6 #define SVGLengthStyleInterpolation_h | 6 #define SVGLengthStyleInterpolation_h |
7 | 7 |
8 #include "core/animation/StyleInterpolation.h" | 8 #include "core/animation/StyleInterpolation.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
10 #include "platform/Length.h" | 10 #include "platform/Length.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class SVGLengthStyleInterpolation : public StyleInterpolation { | 14 class SVGLengthStyleInterpolation : public StyleInterpolation { |
15 public: | 15 public: |
16 static PassRefPtrWillBeRawPtr<SVGLengthStyleInterpolation> maybeCreate(const
CSSValue& start, const CSSValue& end, CSSPropertyID, InterpolationRange); | 16 static PassRefPtrWillBeRawPtr<SVGLengthStyleInterpolation> maybeCreate(const
CSSValue& start, const CSSValue& end, CSSPropertyID, InterpolationRange); |
17 | 17 |
18 virtual void apply(StyleResolverState&) const override; | 18 virtual void apply(StyleResolverState&) const override; |
19 | 19 |
20 virtual void trace(Visitor* visitor) override | 20 DEFINE_INLINE_VIRTUAL_TRACE() |
21 { | 21 { |
22 StyleInterpolation::trace(visitor); | 22 StyleInterpolation::trace(visitor); |
23 } | 23 } |
24 | 24 |
25 private: | 25 private: |
26 SVGLengthStyleInterpolation(const CSSPrimitiveValue& start, const CSSPrimiti
veValue& end, CSSPropertyID, CSSPrimitiveValue::UnitType, InterpolationRange); | 26 SVGLengthStyleInterpolation(const CSSPrimitiveValue& start, const CSSPrimiti
veValue& end, CSSPropertyID, CSSPrimitiveValue::UnitType, InterpolationRange); |
27 | 27 |
28 static bool canCreateFrom(const CSSValue&); | 28 static bool canCreateFrom(const CSSValue&); |
29 static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(c
onst CSSPrimitiveValue&); | 29 static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(c
onst CSSPrimitiveValue&); |
30 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> interpolableValueToLength(c
onst InterpolableValue&, CSSPrimitiveValue::UnitType, InterpolationRange); | 30 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> interpolableValueToLength(c
onst InterpolableValue&, CSSPrimitiveValue::UnitType, InterpolationRange); |
31 | 31 |
32 CSSPrimitiveValue::UnitType m_type; | 32 CSSPrimitiveValue::UnitType m_type; |
33 InterpolationRange m_range; | 33 InterpolationRange m_range; |
34 | 34 |
35 friend class AnimationSVGLengthStyleInterpolationTest; | 35 friend class AnimationSVGLengthStyleInterpolationTest; |
36 }; | 36 }; |
37 | 37 |
38 } | 38 } |
39 | 39 |
40 #endif // SVGLengthStyleInterpolation_h | 40 #endif // SVGLengthStyleInterpolation_h |
OLD | NEW |