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 #ifndef LengthStyleInterpolation_h | 5 #ifndef LengthStyleInterpolation_h |
6 #define LengthStyleInterpolation_h | 6 #define LengthStyleInterpolation_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 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class LayoutStyle; | 13 class ComputedStyle; |
14 class Length; | 14 class Length; |
15 | 15 |
16 class LengthStyleInterpolation : public StyleInterpolation { | 16 class LengthStyleInterpolation : public StyleInterpolation { |
17 public: | 17 public: |
18 typedef void (LayoutStyle::*LengthSetter)(const Length&); | 18 typedef void (ComputedStyle::*LengthSetter)(const Length&); |
19 typedef void NonInterpolableType; | 19 typedef void NonInterpolableType; |
20 | 20 |
21 static PassRefPtrWillBeRawPtr<LengthStyleInterpolation> create(const CSSValu
e& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range) | 21 static PassRefPtrWillBeRawPtr<LengthStyleInterpolation> create(const CSSValu
e& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range) |
22 { | 22 { |
23 return adoptRefWillBeNoop(new LengthStyleInterpolation(toInterpolableVal
ue(start, id), toInterpolableValue(end, id), id, range)); | 23 return adoptRefWillBeNoop(new LengthStyleInterpolation(toInterpolableVal
ue(start, id), toInterpolableValue(end, id), id, range)); |
24 } | 24 } |
25 | 25 |
26 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali
d); | 26 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali
d); |
27 | 27 |
28 virtual void apply(StyleResolverState&) const override; | 28 virtual void apply(StyleResolverState&) const override; |
(...skipping 16 matching lines...) Expand all Loading... |
45 static bool isPixelsOrPercentOnly(const InterpolableValue&); | 45 static bool isPixelsOrPercentOnly(const InterpolableValue&); |
46 static LengthSetter lengthSetterForProperty(CSSPropertyID); | 46 static LengthSetter lengthSetterForProperty(CSSPropertyID); |
47 | 47 |
48 InterpolationRange m_range; | 48 InterpolationRange m_range; |
49 LengthSetter m_lengthSetter; | 49 LengthSetter m_lengthSetter; |
50 }; | 50 }; |
51 | 51 |
52 } | 52 } |
53 | 53 |
54 #endif | 54 #endif |
OLD | NEW |