Index: Source/core/animation/StringKeyframe.cpp |
diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
index c7124255aece91cecf5e98d473ec7efce8f881a9..43fc83f032aee71e017b985cb625ad49132325a3 100644 |
--- a/Source/core/animation/StringKeyframe.cpp |
+++ b/Source/core/animation/StringKeyframe.cpp |
@@ -6,6 +6,7 @@ |
#include "core/animation/StringKeyframe.h" |
#include "core/animation/Interpolation.h" |
+#include "core/animation/LegacyStyleInterpolation.h" |
#include "core/animation/css/CSSAnimations.h" |
#include "core/css/resolver/StyleResolver.h" |
#include "core/rendering/style/RenderStyle.h" |
@@ -71,10 +72,14 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: |
return DefaultStyleInterpolation::create(fromCSSValue, toCSSValue, property); |
switch (property) { |
+ case CSSPropertyBorderBottomWidth: |
+ case CSSPropertyBorderLeftWidth: |
+ case CSSPropertyBorderRightWidth: |
+ case CSSPropertyBorderTopWidth: |
+ case CSSPropertyHeight: |
case CSSPropertyLeft: |
case CSSPropertyRight: |
case CSSPropertyWidth: |
- case CSSPropertyHeight: |
if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue)) |
return LengthStyleInterpolation::create(fromCSSValue, toCSSValue, property); |
break; |
@@ -84,13 +89,13 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: |
// FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here. |
// FIXME: Remove this cache |
- if (!m_animatableValueCache) |
- m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(*element, property, fromCSSValue); |
- |
- RefPtrWillBeRawPtr<AnimatableValue> to = StyleResolver::createAnimatableValueSnapshot(*element, property, toCSSValue); |
- toStringPropertySpecificKeyframe(end)->m_animatableValueCache = to; |
+ if (!m_animatableValueCache && !LegacyStyleInterpolation::interpolationRequiresStyleResolve(*fromCSSValue)) |
+ m_animatableValueCache = StyleResolver::applyAndSnapshotAnimatableValue(*element, property, *fromCSSValue); |
+ StringPropertySpecificKeyframe& endKeyframe = toStringPropertySpecificKeyframe(*end); |
+ if (!endKeyframe.m_animatableValueCache && !LegacyStyleInterpolation::interpolationRequiresStyleResolve(*toCSSValue)) |
+ endKeyframe.m_animatableValueCache = StyleResolver::applyAndSnapshotAnimatableValue(*element, property, *toCSSValue); |
- return LegacyStyleInterpolation::create(m_animatableValueCache.get(), to.release(), property); |
+ return LegacyStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, *element); |
} |
PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> StringKeyframe::PropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const |