Chromium Code Reviews| Index: Source/core/animation/StringKeyframe.cpp |
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
| index 90b68cb8b2e85261872802d33c35f5fb5f89f01a..8ec4d7e38d73e448e973f9a5f751489a83c88f5a 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" |
| @@ -37,6 +38,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)) |
|
dstockwell
2015/02/05 23:04:52
ASSERT?
shend
2015/02/06 03:16:25
Done.
|
| + 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 +82,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 +95,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()) |