Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableShapeValue.cpp

Issue 2750293003: Delete unused AnimatableValue code (Closed)
Patch Set: Fix unit tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/animatable/AnimatableShapeValue.cpp
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableShapeValue.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableShapeValue.cpp
index 8189729b0aaaff1b0cf1f40f559f1cf623d8215a..15961864a817c17700d58b90f5cd10fb96232859 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableShapeValue.cpp
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableShapeValue.cpp
@@ -32,34 +32,6 @@
namespace blink {
-bool AnimatableShapeValue::usesDefaultInterpolationWith(
- const AnimatableValue* value) const {
- const AnimatableShapeValue* shapeValue = toAnimatableShapeValue(value);
-
- if (m_shape->type() != ShapeValue::Shape ||
- shapeValue->m_shape->type() != ShapeValue::Shape ||
- m_shape->cssBox() != shapeValue->m_shape->cssBox())
- return true;
-
- const BasicShape* fromShape = this->m_shape->shape();
- const BasicShape* toShape = shapeValue->m_shape->shape();
-
- return !fromShape->canBlend(toShape);
-}
-
-PassRefPtr<AnimatableValue> AnimatableShapeValue::interpolateTo(
- const AnimatableValue* value,
- double fraction) const {
- if (usesDefaultInterpolationWith(value))
- return defaultInterpolateTo(this, value, fraction);
-
- const AnimatableShapeValue* shapeValue = toAnimatableShapeValue(value);
- const BasicShape* fromShape = this->m_shape->shape();
- const BasicShape* toShape = shapeValue->m_shape->shape();
- return AnimatableShapeValue::create(ShapeValue::createShapeValue(
- toShape->blend(fromShape, fraction), shapeValue->m_shape->cssBox()));
-}
-
bool AnimatableShapeValue::equalTo(const AnimatableValue* value) const {
const ShapeValue* shape = toAnimatableShapeValue(value)->m_shape.get();
return m_shape == shape || (m_shape && shape && *m_shape == *shape);

Powered by Google App Engine
This is Rietveld 408576698