Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: Source/core/animation/EffectInput.cpp

Issue 203463009: Web Animations API: Fix Synthetic keyframes + partial keyframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add asserts that keyframe compositeOperations are replace in ensureInterpolationEffect Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/EffectInput.cpp
diff --git a/Source/core/animation/EffectInput.cpp b/Source/core/animation/EffectInput.cpp
index c92a32219ab774b6b853f43e5412a3c68bd9d0cc..f89f8d2645785d6d555d9a83768ea66e3c0d0cfd 100644
--- a/Source/core/animation/EffectInput.cpp
+++ b/Source/core/animation/EffectInput.cpp
@@ -48,7 +48,7 @@ static bool checkDocumentAndRenderer(Element* element)
return element->renderer();
}
-PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, bool unsafe)
+PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState, bool unsafe)
{
// FIXME: This test will not be neccessary once resolution of keyframe values occurs at
// animation application time.
@@ -106,7 +106,11 @@ PassRefPtrWillBeRawPtr<AnimationEffect> EffectInput::convert(Element* element, c
}
// FIXME: Replace this with code that just parses, when that code is available.
- return StyleResolver::createKeyframeEffectModel(*element, propertySetVector, keyframes);
+ RefPtrWillBeRawPtr<KeyframeEffectModel> keyframeEffectModel = StyleResolver::createKeyframeEffectModel(*element, propertySetVector, keyframes);
+ if (!keyframeEffectModel->isReplaceOnly())
+ exceptionState.throwDOMException(NotSupportedError, "Partial keyframes are not supported.");
shans 2014/03/19 20:43:27 do you need to return null in this case too, or is
+
+ return keyframeEffectModel;
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698