| 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/CSSImageListInterpolationType.h" | 5 #include "core/animation/CSSImageListInterpolationType.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include "core/animation/CSSImageInterpolationType.h" | 8 #include "core/animation/CSSImageInterpolationType.h" |
| 9 #include "core/animation/ImageListPropertyFunctions.h" | 9 #include "core/animation/ImageListPropertyFunctions.h" |
| 10 #include "core/animation/ListInterpolationFunctions.h" | 10 #include "core/animation/ListInterpolationFunctions.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 return InterpolationValue( | 140 return InterpolationValue( |
| 141 std::move(interpolable_list), | 141 std::move(interpolable_list), |
| 142 NonInterpolableList::Create(std::move(non_interpolable_values))); | 142 NonInterpolableList::Create(std::move(non_interpolable_values))); |
| 143 } | 143 } |
| 144 | 144 |
| 145 PairwiseInterpolationValue CSSImageListInterpolationType::MaybeMergeSingles( | 145 PairwiseInterpolationValue CSSImageListInterpolationType::MaybeMergeSingles( |
| 146 InterpolationValue&& start, | 146 InterpolationValue&& start, |
| 147 InterpolationValue&& end) const { | 147 InterpolationValue&& end) const { |
| 148 return ListInterpolationFunctions::MaybeMergeSingles( | 148 return ListInterpolationFunctions::MaybeMergeSingles( |
| 149 std::move(start), std::move(end), | 149 std::move(start), std::move(end), |
| 150 ListInterpolationFunctions::kLowestCommonMultiple, |
| 150 CSSImageInterpolationType::StaticMergeSingleConversions); | 151 CSSImageInterpolationType::StaticMergeSingleConversions); |
| 151 } | 152 } |
| 152 | 153 |
| 153 InterpolationValue | 154 InterpolationValue |
| 154 CSSImageListInterpolationType::MaybeConvertStandardPropertyUnderlyingValue( | 155 CSSImageListInterpolationType::MaybeConvertStandardPropertyUnderlyingValue( |
| 155 const ComputedStyle& style) const { | 156 const ComputedStyle& style) const { |
| 156 StyleImageList underlying_image_list; | 157 StyleImageList underlying_image_list; |
| 157 ImageListPropertyFunctions::GetImageList(CssProperty(), style, | 158 ImageListPropertyFunctions::GetImageList(CssProperty(), style, |
| 158 underlying_image_list); | 159 underlying_image_list); |
| 159 return MaybeConvertStyleImageList(underlying_image_list); | 160 return MaybeConvertStyleImageList(underlying_image_list); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 182 for (size_t i = 0; i < length; i++) { | 183 for (size_t i = 0; i < length; i++) { |
| 183 image_list[i] = CSSImageInterpolationType::ResolveStyleImage( | 184 image_list[i] = CSSImageInterpolationType::ResolveStyleImage( |
| 184 CssProperty(), *interpolable_list.Get(i), non_interpolable_list.Get(i), | 185 CssProperty(), *interpolable_list.Get(i), non_interpolable_list.Get(i), |
| 185 state); | 186 state); |
| 186 } | 187 } |
| 187 ImageListPropertyFunctions::SetImageList(CssProperty(), *state.Style(), | 188 ImageListPropertyFunctions::SetImageList(CssProperty(), *state.Style(), |
| 188 image_list); | 189 image_list); |
| 189 } | 190 } |
| 190 | 191 |
| 191 } // namespace blink | 192 } // namespace blink |
| OLD | NEW |