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/SVGNumberListInterpolationType.h" | 5 #include "core/animation/SVGNumberListInterpolationType.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/animation/InterpolationEnvironment.h" | 8 #include "core/animation/InterpolationEnvironment.h" |
8 #include "core/animation/UnderlyingLengthChecker.h" | 9 #include "core/animation/UnderlyingLengthChecker.h" |
9 #include "core/svg/SVGNumberList.h" | 10 #include "core/svg/SVGNumberList.h" |
10 #include <memory> | |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 InterpolationValue SVGNumberListInterpolationType::MaybeConvertNeutral( | 14 InterpolationValue SVGNumberListInterpolationType::MaybeConvertNeutral( |
15 const InterpolationValue& underlying, | 15 const InterpolationValue& underlying, |
16 ConversionCheckers& conversion_checkers) const { | 16 ConversionCheckers& conversion_checkers) const { |
17 size_t underlying_length = | 17 size_t underlying_length = |
18 UnderlyingLengthChecker::GetUnderlyingLength(underlying); | 18 UnderlyingLengthChecker::GetUnderlyingLength(underlying); |
19 conversion_checkers.push_back( | 19 conversion_checkers.push_back( |
20 UnderlyingLengthChecker::Create(underlying_length)); | 20 UnderlyingLengthChecker::Create(underlying_length)); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 const NonInterpolableValue*) const { | 98 const NonInterpolableValue*) const { |
99 SVGNumberList* result = SVGNumberList::Create(); | 99 SVGNumberList* result = SVGNumberList::Create(); |
100 const InterpolableList& list = ToInterpolableList(interpolable_value); | 100 const InterpolableList& list = ToInterpolableList(interpolable_value); |
101 for (size_t i = 0; i < list.length(); i++) | 101 for (size_t i = 0; i < list.length(); i++) |
102 result->Append( | 102 result->Append( |
103 SVGNumber::Create(ToInterpolableNumber(list.Get(i))->Value())); | 103 SVGNumber::Create(ToInterpolableNumber(list.Get(i))->Value())); |
104 return result; | 104 return result; |
105 } | 105 } |
106 | 106 |
107 } // namespace blink | 107 } // namespace blink |
OLD | NEW |