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 ImageStyleInterpolation_h | 5 #ifndef ImageStyleInterpolation_h |
6 #define ImageStyleInterpolation_h | 6 #define ImageStyleInterpolation_h |
7 | 7 |
8 #include "core/animation/StyleInterpolation.h" | 8 #include "core/animation/StyleInterpolation.h" |
9 #include "core/css/CSSCrossfadeValue.h" | 9 #include "core/css/CSSCrossfadeValue.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 class ImageStyleInterpolation : public StyleInterpolation { | 12 class ImageStyleInterpolation : public StyleInterpolation { |
13 public: | 13 public: |
14 static PassRefPtrWillBeRawPtr<ImageStyleInterpolation> create(CSSValue& star
t, CSSValue& end, CSSPropertyID id) | 14 static PassRefPtrWillBeRawPtr<ImageStyleInterpolation> create(CSSValue& star
t, CSSValue& end, CSSPropertyID id) |
15 { | 15 { |
16 return adoptRefWillBeNoop(new ImageStyleInterpolation(&start, &end, id))
; | 16 return adoptRefWillBeNoop(new ImageStyleInterpolation(&start, &end, id))
; |
17 } | 17 } |
18 | 18 |
| 19 virtual void trace(Visitor*) override; |
| 20 |
19 static bool canCreateFrom(const CSSValue&); | 21 static bool canCreateFrom(const CSSValue&); |
20 virtual void apply(StyleResolverState&) const override; | 22 virtual void apply(StyleResolverState&) const override; |
21 | 23 |
22 private: | 24 private: |
23 ImageStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, PassRefPtrWi
llBeRawPtr<CSSValue> end, CSSPropertyID id) | 25 ImageStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, PassRefPtrWi
llBeRawPtr<CSSValue> end, CSSPropertyID id) |
24 : StyleInterpolation(InterpolableNumber::create(0.0), InterpolableNumber
::create(1.0), id) | 26 : StyleInterpolation(InterpolableNumber::create(0.0), InterpolableNumber
::create(1.0), id) |
25 , m_initialImage(start) | 27 , m_initialImage(start) |
26 , m_finalImage(end) | 28 , m_finalImage(end) |
27 { | 29 { |
28 } | 30 } |
29 | 31 |
30 PassRefPtrWillBeRawPtr<CSSValue> m_initialImage; | 32 RefPtrWillBeMember<CSSValue> m_initialImage; |
31 PassRefPtrWillBeRawPtr<CSSValue> m_finalImage; | 33 RefPtrWillBeMember<CSSValue> m_finalImage; |
32 }; | 34 }; |
33 } | 35 } |
34 | 36 |
35 #endif // ImageStyleInterpolation_h | 37 #endif // ImageStyleInterpolation_h |
OLD | NEW |