| Index: Source/core/animation/StringKeyframe.cpp
|
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp
|
| index 90b68cb8b2e85261872802d33c35f5fb5f89f01a..50a98f25f0e0399f31de7c1f38b42c6a4d06d856 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/ColorStyleInterpolation.h"
|
| +#include "core/animation/CompositorAnimations.h"
|
| #include "core/animation/ConstantStyleInterpolation.h"
|
| #include "core/animation/DefaultStyleInterpolation.h"
|
| #include "core/animation/DeferredLegacyStyleInterpolation.h"
|
| @@ -17,6 +18,7 @@
|
| #include "core/animation/LengthPoint3DStyleInterpolation.h"
|
| #include "core/animation/LengthStyleInterpolation.h"
|
| #include "core/animation/VisibilityStyleInterpolation.h"
|
| +#include "core/animation/css/CSSAnimatableValueFactory.h"
|
| #include "core/animation/css/CSSAnimations.h"
|
| #include "core/css/CSSPropertyMetadata.h"
|
| #include "core/css/resolver/StyleResolver.h"
|
| @@ -37,6 +39,13 @@ void StringKeyframe::setPropertyValue(CSSPropertyID property, const String& valu
|
| m_propertySet->setProperty(property, value, false, styleSheetContents);
|
| }
|
|
|
| +void StringKeyframe::setPropertyValue(CSSPropertyID property, PassRefPtr<CSSValue> value)
|
| +{
|
| + ASSERT(property != CSSPropertyInvalid);
|
| + if (CSSAnimations::isAllowedAnimation(property))
|
| + m_propertySet->setProperty(property, value, false);
|
| +}
|
| +
|
| PropertySet StringKeyframe::properties() const
|
| {
|
| // This is not used in time-critical code, so we probably don't need to
|
| @@ -74,6 +83,11 @@ StringKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset
|
| ASSERT(!isNull(m_offset));
|
| }
|
|
|
| +void StringKeyframe::PropertySpecificKeyframe::setAnimatableValue(PassRefPtr<AnimatableValue> value)
|
| +{
|
| + m_animatableValueCache = value;
|
| +}
|
| +
|
| // FIXME: Refactor this into a generic piece that lives in InterpolationEffect, and a template parameter specific converter.
|
| PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe::maybeCreateInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyframe& end, Element* element) const
|
| {
|
| @@ -82,6 +96,12 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe::
|
| InterpolationRange range = RangeAll;
|
| bool fallBackToLegacy = false;
|
|
|
| + // FIXME: Remove this check once neutral keyframes are implemented in StringKeyframes.
|
| + if (!fromCSSValue || !toCSSValue)
|
| + return DeferredLegacyStyleInterpolation::create(fromCSSValue, toCSSValue, property);
|
| +
|
| + ASSERT(fromCSSValue && toCSSValue);
|
| +
|
| if (!CSSPropertyMetadata::isAnimatableProperty(property)) {
|
| // FIXME: Remove this once TimingFunction partitioning is implemented for all types.
|
| if (!RuntimeEnabledFeatures::webAnimationsAPITimingFunctionPartitioningEnabled())
|
|
|