OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DeferredLegacyStyleInterpolation_h |
| 6 #define DeferredLegacyStyleInterpolation_h |
| 7 |
| 8 #include "core/animation/interpolation/StyleInterpolation.h" |
| 9 #include "core/css/CSSValue.h" |
| 10 |
| 11 namespace WebCore { |
| 12 |
| 13 class CSSImageValue; |
| 14 class CSSPrimitiveValue; |
| 15 class CSSShadowValue; |
| 16 class CSSSVGDocumentValue; |
| 17 class CSSValueList; |
| 18 |
| 19 class DeferredLegacyStyleInterpolation : public StyleInterpolation { |
| 20 public: |
| 21 static PassRefPtrWillBeRawPtr<DeferredLegacyStyleInterpolation> create(PassR
efPtrWillBeRawPtr<CSSValue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSProp
ertyID id) |
| 22 { |
| 23 return adoptRefWillBeNoop(new DeferredLegacyStyleInterpolation(start, en
d, id)); |
| 24 } |
| 25 |
| 26 virtual void apply(StyleResolverState&) const OVERRIDE; |
| 27 |
| 28 virtual void trace(Visitor*) OVERRIDE; |
| 29 |
| 30 static bool interpolationRequiresStyleResolve(const CSSValue&); |
| 31 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); |
| 32 static bool interpolationRequiresStyleResolve(const CSSImageValue&); |
| 33 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); |
| 34 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&); |
| 35 static bool interpolationRequiresStyleResolve(const CSSValueList&); |
| 36 |
| 37 private: |
| 38 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas
sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id) |
| 39 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) |
| 40 , m_startCSSValue(start) |
| 41 , m_endCSSValue(end) |
| 42 { |
| 43 } |
| 44 |
| 45 RefPtrWillBeRawPtr<CSSValue> m_startCSSValue; |
| 46 RefPtrWillBeRawPtr<CSSValue> m_endCSSValue; |
| 47 }; |
| 48 |
| 49 } |
| 50 |
| 51 #endif |
OLD | NEW |