Index: Source/core/animation/Interpolation.cpp |
diff --git a/Source/core/animation/Interpolation.cpp b/Source/core/animation/Interpolation.cpp |
index 1738b817f533f9a98d670160a2a91f1ae70aaa9c..4b67a64ffa09f23c57802137dbd63ab180beaaf2 100644 |
--- a/Source/core/animation/Interpolation.cpp |
+++ b/Source/core/animation/Interpolation.cpp |
@@ -6,9 +6,8 @@ |
#include "core/animation/Interpolation.h" |
#include "core/css/CSSCalculationValue.h" |
-#include "core/css/resolver/AnimatedStyleBuilder.h" |
+#include "core/css/CSSPrimitiveValue.h" |
#include "core/css/resolver/StyleBuilder.h" |
-#include "core/css/resolver/StyleResolverState.h" |
namespace WebCore { |
@@ -44,15 +43,18 @@ Interpolation::Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa |
, m_end(end) |
, m_cachedFraction(0) |
, m_cachedIteration(0) |
- , m_cachedValue(m_start->clone()) |
{ |
- RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get())); |
+ if (m_start) { |
+ m_cachedValue = m_start->clone(); |
+ RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get())); |
+ } |
} |
void Interpolation::interpolate(int iteration, double fraction) const |
{ |
if (m_cachedFraction != fraction || m_cachedIteration != iteration) { |
- m_cachedValue = m_start->interpolate(*m_end, fraction); |
+ if (m_start) |
+ m_cachedValue = m_start->interpolate(*m_end, fraction); |
m_cachedIteration = iteration; |
m_cachedFraction = fraction; |
} |
@@ -70,16 +72,6 @@ void StyleInterpolation::trace(Visitor* visitor) |
Interpolation::trace(visitor); |
} |
-void LegacyStyleInterpolation::apply(StyleResolverState& state) const |
-{ |
- AnimatedStyleBuilder::applyProperty(m_id, state, currentValue().get()); |
-} |
- |
-void LegacyStyleInterpolation::trace(Visitor* visitor) |
-{ |
- StyleInterpolation::trace(visitor); |
-} |
- |
bool LengthStyleInterpolation::canCreateFrom(const CSSValue& value) |
{ |
if (value.isPrimitiveValue()) { |