| Index: Source/core/animation/Interpolation.cpp
|
| diff --git a/Source/core/animation/Interpolation.cpp b/Source/core/animation/Interpolation.cpp
|
| index 21b955fa95beb3048df02c05cf3b81fa5783640b..4c3ef4c8bb5deea9254e64ce720b71b4f08377a0 100644
|
| --- a/Source/core/animation/Interpolation.cpp
|
| +++ b/Source/core/animation/Interpolation.cpp
|
| @@ -11,6 +11,8 @@ namespace {
|
|
|
| bool typesMatch(const InterpolableValue* start, const InterpolableValue* end)
|
| {
|
| + if (start == end)
|
| + return true;
|
| if (start->isNumber())
|
| return end->isNumber();
|
| if (start->isBool())
|
| @@ -37,7 +39,7 @@ Interpolation::Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa
|
| , m_end(end)
|
| , m_cachedFraction(0)
|
| , m_cachedIteration(0)
|
| - , m_cachedValue(m_start->clone())
|
| + , m_cachedValue(m_start ? m_start->clone() : nullptr)
|
| {
|
| RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get()));
|
| }
|
| @@ -46,7 +48,7 @@ Interpolation::~Interpolation()
|
| {
|
| }
|
|
|
| -void Interpolation::interpolate(int iteration, double fraction) const
|
| +void Interpolation::interpolate(int iteration, double fraction)
|
| {
|
| if (m_cachedFraction != fraction || m_cachedIteration != iteration) {
|
| m_start->interpolate(*m_end, fraction, *m_cachedValue);
|
|
|