OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 NumberOptionalNumberSVGInterpolation_h | 5 #ifndef NumberOptionalNumberSVGInterpolation_h |
6 #define NumberOptionalNumberSVGInterpolation_h | 6 #define NumberOptionalNumberSVGInterpolation_h |
7 | 7 |
8 #include "core/animation/SVGInterpolation.h" | 8 #include "core/animation/SVGInterpolation.h" |
9 #include "core/svg/SVGNumber.h" | 9 #include "core/svg/SVGNumber.h" |
10 #include "core/svg/SVGNumberOptionalNumber.h" | 10 #include "core/svg/SVGNumberOptionalNumber.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class SVGNumberOptionalNumber; | 14 class SVGNumberOptionalNumber; |
15 | 15 |
16 class NumberOptionalNumberSVGInterpolation : public SVGInterpolation { | 16 class NumberOptionalNumberSVGInterpolation : public SVGInterpolation { |
17 public: | 17 public: |
18 static PassRefPtrWillBeRawPtr<NumberOptionalNumberSVGInterpolation> create(S
VGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedP
ropertyBase> attribute) | 18 static PassRefPtrWillBeRawPtr<NumberOptionalNumberSVGInterpolation> create(S
VGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedP
ropertyBase> attribute) |
19 { | 19 { |
20 return adoptRefWillBeNoop(new NumberOptionalNumberSVGInterpolation(toInt
erpolableValue(start), toInterpolableValue(end), attribute)); | 20 return adoptRefWillBeNoop(new NumberOptionalNumberSVGInterpolation(toInt
erpolableValue(start), toInterpolableValue(end), attribute)); |
21 } | 21 } |
22 | 22 |
23 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement
&) const override final | 23 PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const
final |
24 { | 24 { |
25 return fromInterpolableValue(*m_cachedValue); | 25 return fromInterpolableValue(*m_cachedValue); |
26 } | 26 } |
27 | 27 |
28 DEFINE_INLINE_VIRTUAL_TRACE() | 28 DEFINE_INLINE_VIRTUAL_TRACE() |
29 { | 29 { |
30 SVGInterpolation::trace(visitor); | 30 SVGInterpolation::trace(visitor); |
31 } | 31 } |
32 | 32 |
33 private: | 33 private: |
(...skipping 16 matching lines...) Expand all Loading... |
50 const InterpolableList& list = toInterpolableList(value); | 50 const InterpolableList& list = toInterpolableList(value); |
51 return SVGNumberOptionalNumber::create( | 51 return SVGNumberOptionalNumber::create( |
52 SVGNumber::create(toInterpolableNumber(list.get(0))->value()), | 52 SVGNumber::create(toInterpolableNumber(list.get(0))->value()), |
53 SVGNumber::create(toInterpolableNumber(list.get(1))->value())); | 53 SVGNumber::create(toInterpolableNumber(list.get(1))->value())); |
54 } | 54 } |
55 }; | 55 }; |
56 | 56 |
57 } | 57 } |
58 | 58 |
59 #endif // NumberOptionalNumberSVGInterpolation_h | 59 #endif // NumberOptionalNumberSVGInterpolation_h |
OLD | NEW |