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