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 #include "core/animation/SVGNumberOptionalNumberInterpolationType.h" | 5 #include "core/animation/SVGNumberOptionalNumberInterpolationType.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/animation/InterpolationEnvironment.h" | 8 #include "core/animation/InterpolationEnvironment.h" |
8 #include "core/svg/SVGNumberOptionalNumber.h" | 9 #include "core/svg/SVGNumberOptionalNumber.h" |
9 #include <memory> | |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 InterpolationValue | 13 InterpolationValue |
14 SVGNumberOptionalNumberInterpolationType::maybeConvertNeutral( | 14 SVGNumberOptionalNumberInterpolationType::maybeConvertNeutral( |
15 const InterpolationValue&, | 15 const InterpolationValue&, |
16 ConversionCheckers&) const { | 16 ConversionCheckers&) const { |
17 std::unique_ptr<InterpolableList> result = InterpolableList::create(2); | 17 std::unique_ptr<InterpolableList> result = InterpolableList::create(2); |
18 result->set(0, InterpolableNumber::create(0)); | 18 result->set(0, InterpolableNumber::create(0)); |
19 result->set(1, InterpolableNumber::create(0)); | 19 result->set(1, InterpolableNumber::create(0)); |
(...skipping 19 matching lines...) Expand all Loading... |
39 SVGPropertyBase* SVGNumberOptionalNumberInterpolationType::appliedSVGValue( | 39 SVGPropertyBase* SVGNumberOptionalNumberInterpolationType::appliedSVGValue( |
40 const InterpolableValue& interpolableValue, | 40 const InterpolableValue& interpolableValue, |
41 const NonInterpolableValue*) const { | 41 const NonInterpolableValue*) const { |
42 const InterpolableList& list = toInterpolableList(interpolableValue); | 42 const InterpolableList& list = toInterpolableList(interpolableValue); |
43 return SVGNumberOptionalNumber::create( | 43 return SVGNumberOptionalNumber::create( |
44 SVGNumber::create(toInterpolableNumber(list.get(0))->value()), | 44 SVGNumber::create(toInterpolableNumber(list.get(0))->value()), |
45 SVGNumber::create(toInterpolableNumber(list.get(1))->value())); | 45 SVGNumber::create(toInterpolableNumber(list.get(1))->value())); |
46 } | 46 } |
47 | 47 |
48 } // namespace blink | 48 } // namespace blink |
OLD | NEW |