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

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

Issue 190763007: [WIP] Web Animations API: Constructing an Animation from partial keyframes throws a JS exception (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replace manual checks with check for dependsOnUnderlyingValue 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
« no previous file with comments | « Source/core/animation/EffectInput.h ('k') | Source/core/animation/ElementAnimation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/EffectInput.cpp
diff --git a/Source/core/animation/EffectInput.cpp b/Source/core/animation/EffectInput.cpp
index 2f87c28e668d7f864803948083a75f07a80e13f9..b8cbfb4863cfd61817b3b437a0ab11f606dac997 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.
@@ -104,7 +104,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.");
+
+ return keyframeEffectModel;
}
} // namespace WebCore
« no previous file with comments | « Source/core/animation/EffectInput.h ('k') | Source/core/animation/ElementAnimation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698