OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 LengthSVGInterpolation_h | |
6 #define LengthSVGInterpolation_h | |
7 | |
8 #include "core/animation/SVGInterpolation.h" | |
9 #include "core/svg/SVGLength.h" | |
10 #include "core/svg/SVGLengthList.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class LengthSVGInterpolation : public SVGInterpolation { | |
15 public: | |
16 typedef SVGLengthList ListType; | |
17 struct NonInterpolableType { | |
18 DISALLOW_NEW(); | |
19 SVGLengthMode unitMode; | |
20 }; | |
21 | |
22 static bool canCreateFrom(SVGLength*, SVGLength*) | |
23 { | |
24 return true; | |
25 } | |
26 | |
27 static PassRefPtrWillBeRawPtr<SVGLengthList> createList(const SVGAnimatedPro
pertyBase&); | |
28 | |
29 static PassRefPtr<LengthSVGInterpolation> create(SVGPropertyBase* start, SVG
PropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute); | |
30 | |
31 static PassOwnPtr<InterpolableValue> toInterpolableValue(SVGLength*, const S
VGAnimatedPropertyBase*, NonInterpolableType*); | |
32 | |
33 static PassRefPtrWillBeRawPtr<SVGLength> fromInterpolableValue(const Interpo
lableValue&, const NonInterpolableType&, const SVGElement*, const QualifiedName&
); | |
34 | |
35 PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const
final; | |
36 | |
37 private: | |
38 LengthSVGInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Inter
polableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute, co
nst NonInterpolableType& modeData) | |
39 : SVGInterpolation(start, end, attribute) | |
40 , m_modeData(modeData) | |
41 { | |
42 } | |
43 | |
44 const NonInterpolableType m_modeData; | |
45 }; | |
46 | |
47 } | |
48 | |
49 #endif // LengthSVGInterpolation_h | |
OLD | NEW |