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