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

Unified Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.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/AnimatableShadow.cpp
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.cpp
index f29eec59d9e282adae1c6346f8393caacbacb5c6..cd9dadc95d01b0ff355b234c89fd5e585057fb43 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.cpp
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.cpp
@@ -32,38 +32,6 @@
namespace blink {
-PassRefPtr<AnimatableValue> AnimatableShadow::interpolateTo(
- const AnimatableValue* value,
- double fraction) const {
- if (usesDefaultInterpolationWith(value))
- return defaultInterpolateTo(this, value, fraction);
-
- const AnimatableShadow* shadowList = toAnimatableShadow(value);
- return AnimatableShadow::create(
- ShadowList::blend(m_shadowList.get(), shadowList->m_shadowList.get(),
- fraction, m_currentColor),
- m_currentColor);
-}
-
-bool AnimatableShadow::usesDefaultInterpolationWith(
- const AnimatableValue* value) const {
- const AnimatableShadow* target = toAnimatableShadow(value);
- if (!m_shadowList || !target->m_shadowList)
- return false;
-
- size_t minLength = std::min(m_shadowList->shadows().size(),
- target->m_shadowList->shadows().size());
- for (size_t i = 0; i < minLength; ++i) {
- ShadowStyle fromShadowStyle = m_shadowList->shadows()[i].style();
- ShadowStyle toShadowStyle = target->m_shadowList->shadows()[i].style();
-
- if (fromShadowStyle != toShadowStyle)
- return true;
- }
-
- return false;
-}
-
bool AnimatableShadow::equalTo(const AnimatableValue* value) const {
const ShadowList* shadowList = toAnimatableShadow(value)->m_shadowList.get();
return m_shadowList == shadowList ||

Powered by Google App Engine
This is Rietveld 408576698