| 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 DeferredLegacyStyleInterpolation_h | 5 #ifndef DeferredLegacyStyleInterpolation_h |
| 6 #define DeferredLegacyStyleInterpolation_h | 6 #define DeferredLegacyStyleInterpolation_h |
| 7 | 7 |
| 8 #include "core/animation/StyleInterpolation.h" | 8 #include "core/animation/StyleInterpolation.h" |
| 9 #include "core/css/CSSValue.h" | 9 #include "core/css/CSSValue.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class CSSBasicShape; | 13 class CSSBasicShape; |
| 14 class CSSImageValue; | 14 class CSSImageValue; |
| 15 class CSSPrimitiveValue; | 15 class CSSPrimitiveValue; |
| 16 class CSSShadowValue; | 16 class CSSShadowValue; |
| 17 class CSSValueList; | 17 class CSSValueList; |
| 18 | 18 |
| 19 class DeferredLegacyStyleInterpolation : public StyleInterpolation { | 19 class DeferredLegacyStyleInterpolation : public StyleInterpolation { |
| 20 public: | 20 public: |
| 21 static PassRefPtr<DeferredLegacyStyleInterpolation> create(PassRefPtr<CSSVal
ue> start, PassRefPtr<CSSValue> end, CSSPropertyID id) | 21 static PassRefPtr<DeferredLegacyStyleInterpolation> create(PassRefPtr<CSSVal
ue> start, PassRefPtr<CSSValue> end, CSSPropertyID id) |
| 22 { | 22 { |
| 23 return adoptRef(new DeferredLegacyStyleInterpolation(start, end, id)); | 23 return adoptRef(new DeferredLegacyStyleInterpolation(start, end, id)); |
| 24 } | 24 } |
| 25 | 25 |
| 26 virtual void apply(StyleResolverState&) const override; | 26 virtual void apply(StyleResolverState&) const override; |
| 27 | 27 |
| 28 virtual void trace(Visitor*) override; | |
| 29 | |
| 30 static bool interpolationRequiresStyleResolve(const CSSValue&); | 28 static bool interpolationRequiresStyleResolve(const CSSValue&); |
| 31 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); | 29 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); |
| 32 static bool interpolationRequiresStyleResolve(const CSSImageValue&); | 30 static bool interpolationRequiresStyleResolve(const CSSImageValue&); |
| 33 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); | 31 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); |
| 34 static bool interpolationRequiresStyleResolve(const CSSValueList&); | 32 static bool interpolationRequiresStyleResolve(const CSSValueList&); |
| 35 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); | 33 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); |
| 36 | 34 |
| 37 private: | 35 private: |
| 38 DeferredLegacyStyleInterpolation(PassRefPtr<CSSValue> start, PassRefPtr<CSSV
alue> end, CSSPropertyID id) | 36 DeferredLegacyStyleInterpolation(PassRefPtr<CSSValue> start, PassRefPtr<CSSV
alue> end, CSSPropertyID id) |
| 39 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) | 37 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) |
| 40 , m_startCSSValue(start) | 38 , m_startCSSValue(start) |
| 41 , m_endCSSValue(end) | 39 , m_endCSSValue(end) |
| 42 { | 40 { |
| 43 } | 41 } |
| 44 | 42 |
| 45 RefPtr<CSSValue> m_startCSSValue; | 43 RefPtr<CSSValue> m_startCSSValue; |
| 46 RefPtr<CSSValue> m_endCSSValue; | 44 RefPtr<CSSValue> m_endCSSValue; |
| 47 }; | 45 }; |
| 48 | 46 |
| 49 } | 47 } |
| 50 | 48 |
| 51 #endif | 49 #endif |
| OLD | NEW |