| Index: Source/core/animation/AnimatableShadow.cpp
|
| diff --git a/Source/core/animation/AnimatableSVGLength.cpp b/Source/core/animation/AnimatableShadow.cpp
|
| similarity index 64%
|
| copy from Source/core/animation/AnimatableSVGLength.cpp
|
| copy to Source/core/animation/AnimatableShadow.cpp
|
| index bbf13e3f2f3f636f7e8a87377c59edf60f6fa64f..4d1a847f319b7de819d8fe25a3f461aac6b45a53 100644
|
| --- a/Source/core/animation/AnimatableSVGLength.cpp
|
| +++ b/Source/core/animation/AnimatableShadow.cpp
|
| @@ -29,26 +29,27 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/animation/AnimatableSVGLength.h"
|
| -
|
| -#include "platform/FloatConversion.h"
|
| +#include "core/animation/AnimatableShadow.h"
|
|
|
| namespace WebCore {
|
|
|
| -PassRefPtr<AnimatableValue> AnimatableSVGLength::interpolateTo(const AnimatableValue* value, double fraction) const
|
| +PassRefPtr<AnimatableValue> AnimatableShadow::interpolateTo(const AnimatableValue* value, double fraction) const
|
| {
|
| - return create(toAnimatableSVGLength(value)->toSVGLength().blend(m_length, narrowPrecisionToFloat(fraction)));
|
| + const AnimatableShadow* shadowList = toAnimatableShadow(value);
|
| + return AnimatableShadow::create(ShadowList::blend(m_shadowList.get(), shadowList->m_shadowList.get(), fraction));
|
| }
|
|
|
| -PassRefPtr<AnimatableValue> AnimatableSVGLength::addWith(const AnimatableValue* value) const
|
| +PassRefPtr<AnimatableValue> AnimatableShadow::addWith(const AnimatableValue* value) const
|
| {
|
| - RELEASE_ASSERT_WITH_MESSAGE(false, "Web Animations not yet implemented: AnimatableSVGLength::addWith()");
|
| - return 0;
|
| + // FIXME: The spec doesn't specify anything for shadow in particular, but
|
| + // the default behaviour is probably not what one would expect.
|
| + return AnimatableValue::defaultAddWith(this, value);
|
| }
|
|
|
| -bool AnimatableSVGLength::equalTo(const AnimatableValue* value) const
|
| +bool AnimatableShadow::equalTo(const AnimatableValue* value) const
|
| {
|
| - return m_length == toAnimatableSVGLength(value)->m_length;
|
| + const ShadowList* shadowList = toAnimatableShadow(value)->m_shadowList.get();
|
| + return m_shadowList == shadowList || (m_shadowList && shadowList && *m_shadowList == *shadowList);
|
| }
|
|
|
| } // namespace WebCore
|
|
|