Index: third_party/WebKit/Source/core/animation/animatable/AnimatableRepeatable.cpp |
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableRepeatable.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableRepeatable.cpp |
index 2dc154dcff58f42752b4a1f7cdca41f6c41cb713..43a7c80335d0b10b6f8326ba296177cf7461fbcf 100644 |
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableRepeatable.cpp |
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableRepeatable.cpp |
@@ -34,60 +34,6 @@ |
namespace blink { |
-bool AnimatableRepeatable::usesDefaultInterpolationWith( |
- const AnimatableValue* value) const { |
- const Vector<RefPtr<AnimatableValue>>& fromValues = m_values; |
- const Vector<RefPtr<AnimatableValue>>& toValues = |
- toAnimatableRepeatable(value)->m_values; |
- DCHECK(!fromValues.isEmpty() && !toValues.isEmpty()); |
- size_t size = lowestCommonMultiple(fromValues.size(), toValues.size()); |
- DCHECK_GT(size, 0U); |
- for (size_t i = 0; i < size; ++i) { |
- const AnimatableValue* from = fromValues[i % fromValues.size()].get(); |
- const AnimatableValue* to = toValues[i % toValues.size()].get(); |
- // Spec: If a pair of values cannot be interpolated, then the lists are not |
- // interpolable. |
- if (AnimatableValue::usesDefaultInterpolation(from, to)) |
- return true; |
- } |
- return false; |
-} |
- |
-bool AnimatableRepeatable::interpolateLists( |
- const Vector<RefPtr<AnimatableValue>>& fromValues, |
- const Vector<RefPtr<AnimatableValue>>& toValues, |
- double fraction, |
- Vector<RefPtr<AnimatableValue>>& interpolatedValues) { |
- // Interpolation behaviour spec: |
- // http://www.w3.org/TR/css3-transitions/#animtype-repeatable-list |
- DCHECK(interpolatedValues.isEmpty()); |
- DCHECK(!fromValues.isEmpty() && !toValues.isEmpty()); |
- size_t size = lowestCommonMultiple(fromValues.size(), toValues.size()); |
- DCHECK_GT(size, 0U); |
- for (size_t i = 0; i < size; ++i) { |
- const AnimatableValue* from = fromValues[i % fromValues.size()].get(); |
- const AnimatableValue* to = toValues[i % toValues.size()].get(); |
- // Spec: If a pair of values cannot be interpolated, then the lists are not |
- // interpolable. |
- if (AnimatableValue::usesDefaultInterpolation(from, to)) |
- return false; |
- interpolatedValues.push_back(interpolate(from, to, fraction)); |
- } |
- return true; |
-} |
- |
-PassRefPtr<AnimatableValue> AnimatableRepeatable::interpolateTo( |
- const AnimatableValue* value, |
- double fraction) const { |
- Vector<RefPtr<AnimatableValue>> interpolatedValues; |
- bool success = |
- interpolateLists(m_values, toAnimatableRepeatable(value)->m_values, |
- fraction, interpolatedValues); |
- if (success) |
- return create(interpolatedValues); |
- return defaultInterpolateTo(this, value, fraction); |
-} |
- |
bool AnimatableRepeatable::equalTo(const AnimatableValue* value) const { |
const Vector<RefPtr<AnimatableValue>>& otherValues = |
toAnimatableRepeatable(value)->m_values; |