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.
5 #ifndef DeferredLegacyStyleInterpolation_h
6 #define DeferredLegacyStyleInterpolation_h
8 #include "core/animation/StyleInterpolation.h"
9 #include "core/css/CSSValue.h"
15 class CSSPrimitiveValue;
17 class CSSSVGDocumentValue;
20 class DeferredLegacyStyleInterpolation : public StyleInterpolation {
22 static PassRefPtrWillBeRawPtr<DeferredLegacyStyleInterpolation> create(PassRefPtrWillBeRawPtr<CSSValue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id)
24 return adoptRefWillBeNoop(new DeferredLegacyStyleInterpolation(start, end, id));
27 virtual void apply(StyleResolverState&) const OVERRIDE;
29 virtual void trace(Visitor*) OVERRIDE;
31 static bool interpolationRequiresStyleResolve(const CSSValue&);
32 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&);
33 static bool interpolationRequiresStyleResolve(const CSSImageValue&);
34 static bool interpolationRequiresStyleResolve(const CSSShadowValue&);
35 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&);
36 static bool interpolationRequiresStyleResolve(const CSSValueList&);
37 static bool interpolationRequiresStyleResolve(const CSSBasicShape&);
40 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id)
41 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::create(1), id)
42 , m_startCSSValue(start)
47 RefPtrWillBeMember<CSSValue> m_startCSSValue;
48 RefPtrWillBeMember<CSSValue> m_endCSSValue;