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

Unified Diff: Source/core/animation/ElementAnimation.h

Issue 182063005: Web Animations API: Refactor IDL input conversion out of Animation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix up includes Created 6 years, 10 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/Animation.cpp ('k') | Source/core/animation/ElementAnimation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ElementAnimation.h
diff --git a/Source/core/animation/ElementAnimation.h b/Source/core/animation/ElementAnimation.h
index a27a0f34f453880028b8c8a2a8b968438f7bfa9c..549d6c9a8e1c6a2aeb089117fd3182c16cd51764 100644
--- a/Source/core/animation/ElementAnimation.h
+++ b/Source/core/animation/ElementAnimation.h
@@ -31,19 +31,23 @@
#ifndef ElementAnimation_h
#define ElementAnimation_h
-#include "wtf/Vector.h"
+#include "RuntimeEnabledFeatures.h"
+#include "core/animation/Animation.h"
+#include "core/animation/DocumentTimeline.h"
+#include "core/animation/Timing.h"
namespace WebCore {
-class Animation;
-class Dictionary;
-class Element;
-
class ElementAnimation {
public:
- static Animation* animate(Element&, Vector<Dictionary> keyframesDictionaryVector, Dictionary timingInput);
- static Animation* animate(Element&, Vector<Dictionary> keyframesDictionaryVector, double timingInput);
- static Animation* animate(Element&, Vector<Dictionary> keyframesDictionaryVector);
+ template<typename E, typename T = double>
+ static Animation* animate(Element& element, E effect, T timing = Timing::initialIterationDuration())
dstockwell 2014/02/27 09:49:36 Body should stay in cpp. I think this would work
shans 2014/02/27 20:39:33 Body can't remain in cpp. This is the joy, the won
alancutter (OOO until 2018) 2014/02/28 00:40:22 AFAICT this is the same as using a default paramet
dstockwell 2014/02/28 00:56:37 The result is the same, but it's more readable.
alancutter (OOO until 2018) 2014/03/03 05:09:45 Done.
+ {
+ ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
+ RefPtr<Animation> animation = Animation::create(&element, effect, timing);
+ element.document().timeline().play(animation.get());
+ return animation.get();
+ }
};
} // namespace WebCore
« no previous file with comments | « Source/core/animation/Animation.cpp ('k') | Source/core/animation/ElementAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698