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..bf99b998eb6b4a4bf2b03447e701f5d633a71e71 100644 |
| --- a/Source/core/animation/StringKeyframe.cpp |
| +++ b/Source/core/animation/StringKeyframe.cpp |
| @@ -37,6 +37,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 +81,11 @@ StringKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset |
| ASSERT(!isNull(m_offset)); |
| } |
| +void StringKeyframe::PropertySpecificKeyframe::setAnimatableValue(PassRefPtr<AnimatableValue> value) |
| +{ |
| + m_animatableValueCache = value; |
|
Timothy Loh
2015/02/04 05:31:45
assert we're a compositable property?
shend
2015/02/04 22:51:34
Oops, PropertySpecificKeyframes don't actually hav
|
| +} |
| + |
| // 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 +94,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()) |