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

Unified Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableImage.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/AnimatableImage.cpp
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableImage.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableImage.cpp
index 5949017d20cd95e4a66ddad4b4312c7aaf4a0202..61e23d65d55e9b71bd5b7607cb72879b5c9f129e 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableImage.cpp
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableImage.cpp
@@ -31,34 +31,10 @@
#include "core/animation/animatable/AnimatableImage.h"
#include "core/css/CSSImageValue.h"
-#include "core/style/StyleGeneratedImage.h"
#include "wtf/MathExtras.h"
namespace blink {
-bool AnimatableImage::usesDefaultInterpolationWith(
- const AnimatableValue* value) const {
- if (!m_value->isImageValue())
- return true;
- if (!toAnimatableImage(value)->toCSSValue()->isImageValue())
- return true;
- return false;
-}
-
-PassRefPtr<AnimatableValue> AnimatableImage::interpolateTo(
- const AnimatableValue* value,
- double fraction) const {
- if (fraction <= 0 || fraction >= 1 || usesDefaultInterpolationWith(value))
- return defaultInterpolateTo(this, value, fraction);
-
- CSSValue* fromValue = toCSSValue();
- CSSValue* toValue = toAnimatableImage(value)->toCSSValue();
-
- return create(CSSCrossfadeValue::create(
- fromValue, toValue, CSSPrimitiveValue::create(
- fraction, CSSPrimitiveValue::UnitType::Number)));
-}
-
bool AnimatableImage::equalTo(const AnimatableValue* value) const {
return dataEquivalent(m_value, toAnimatableImage(value)->m_value);
}

Powered by Google App Engine
This is Rietveld 408576698