| Index: Source/core/animation/EffectInput.cpp
|
| diff --git a/Source/core/animation/EffectInput.cpp b/Source/core/animation/EffectInput.cpp
|
| index 7dbbf7cfe5498cef29b00d8bc7f75ef7915609b1..ad93440e0ff55816b15fb36814e6ecd28864a918 100644
|
| --- a/Source/core/animation/EffectInput.cpp
|
| +++ b/Source/core/animation/EffectInput.cpp
|
| @@ -43,6 +43,19 @@
|
|
|
| namespace blink {
|
|
|
| +static bool isValidValueForInterpolation(const CSSPropertyID& property, const CSSValue& value)
|
| +{
|
| + const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
|
| +
|
| + switch (property) {
|
| + case CSSPropertyFontSizeAdjust:
|
| + return primitiveValue.getDoubleValue(CSSPrimitiveValue::CSS_NUMBER) > 0;
|
| + default:
|
| + break;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState)
|
| {
|
| // FIXME: Remove the dependency on element.
|
| @@ -51,6 +64,7 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
|
|
|
| StyleSheetContents* styleSheetContents = element->document().elementSheet().contents();
|
| StringKeyframeVector keyframes;
|
| + PropertySet invalidValueProperties;
|
| double lastOffset = 0;
|
|
|
| for (const auto& keyframeDictionary : keyframeDictionaryVector) {
|
| @@ -104,9 +118,17 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
|
| String value;
|
| DictionaryHelper::get(keyframeDictionary, property, value);
|
| keyframe->setPropertyValue(id, value, styleSheetContents);
|
| +
|
| + if (!isValidValueForInterpolation(id, *keyframe->propertyValue(id)))
|
| + invalidValueProperties.add(id);
|
| }
|
| }
|
|
|
| + for (CSSPropertyID property : invalidValueProperties) {
|
| + for (const auto& keyframe : keyframes)
|
| + keyframe->clearPropertyValue(property);
|
| + }
|
| +
|
| RefPtrWillBeRawPtr<StringKeyframeEffectModel> keyframeEffectModel = StringKeyframeEffectModel::create(keyframes);
|
| if (keyframeEffectModel->hasSyntheticKeyframes()) {
|
| exceptionState.throwDOMException(NotSupportedError, "Partial keyframes are not supported.");
|
|
|