| 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 CSSSVGDocumentValue; | 17 class CSSSVGDocumentValue; |
| 18 class CSSValueList; | 18 class CSSValueList; |
| 19 | 19 |
| 20 class DeferredLegacyStyleInterpolation : public StyleInterpolation { | 20 class DeferredLegacyStyleInterpolation : public StyleInterpolation { |
| 21 public: | 21 public: |
| 22 static PassRefPtrWillBeRawPtr<DeferredLegacyStyleInterpolation> create(PassR
efPtrWillBeRawPtr<CSSValue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSProp
ertyID id) | 22 static PassRefPtrWillBeRawPtr<DeferredLegacyStyleInterpolation> create(PassR
efPtrWillBeRawPtr<CSSValue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSProp
ertyID id) |
| 23 { | 23 { |
| 24 return adoptRefWillBeNoop(new DeferredLegacyStyleInterpolation(start, en
d, id)); | 24 return adoptRefWillBeNoop(new DeferredLegacyStyleInterpolation(start, en
d, id)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 virtual void apply(StyleResolverState&) const OVERRIDE; | 27 virtual void apply(StyleResolverState&) const override; |
| 28 | 28 |
| 29 virtual void trace(Visitor*) OVERRIDE; | 29 virtual void trace(Visitor*) override; |
| 30 | 30 |
| 31 static bool interpolationRequiresStyleResolve(const CSSValue&); | 31 static bool interpolationRequiresStyleResolve(const CSSValue&); |
| 32 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); | 32 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); |
| 33 static bool interpolationRequiresStyleResolve(const CSSImageValue&); | 33 static bool interpolationRequiresStyleResolve(const CSSImageValue&); |
| 34 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); | 34 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); |
| 35 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&); | 35 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&); |
| 36 static bool interpolationRequiresStyleResolve(const CSSValueList&); | 36 static bool interpolationRequiresStyleResolve(const CSSValueList&); |
| 37 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); | 37 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas
sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id) | 40 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas
sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id) |
| 41 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) | 41 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) |
| 42 , m_startCSSValue(start) | 42 , m_startCSSValue(start) |
| 43 , m_endCSSValue(end) | 43 , m_endCSSValue(end) |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 RefPtrWillBeMember<CSSValue> m_startCSSValue; | 47 RefPtrWillBeMember<CSSValue> m_startCSSValue; |
| 48 RefPtrWillBeMember<CSSValue> m_endCSSValue; | 48 RefPtrWillBeMember<CSSValue> m_endCSSValue; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } | 51 } |
| 52 | 52 |
| 53 #endif | 53 #endif |
| OLD | NEW |