Index: core/animation/Animation.idl |
diff --git a/core/animation/Animation.idl b/core/animation/Animation.idl |
index 02b98bf8234570c35b31e85820a75219fe3f3fa4..76ef6bb57d49975fdc48c22c94dd6751e4faba7d 100644 |
--- a/core/animation/Animation.idl |
+++ b/core/animation/Animation.idl |
@@ -28,14 +28,29 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-// http://dev.w3.org/fxtf/web-animations/#idl-def-Animation |
+// https://w3c.github.io/web-animations/#animation |
+ |
+enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" }; |
[ |
- // FIXME: should be optional union type http://crbug.com/240176 |
- Constructor(Element? target, sequence<Dictionary> keyframes), |
- Constructor(Element? target, sequence<Dictionary> keyframes, double timingInput), |
- Constructor(Element? target, sequence<Dictionary> keyframes, Dictionary timingInput), |
- RaisesException=Constructor, |
- RuntimeEnabled=WebAnimationsAPI, |
-] interface Animation : AnimationNode { |
+ ActiveDOMObject, |
+ NoInterfaceObject, |
+] interface Animation : EventTarget { |
+ // TODO(dstockwell): Add timeline property. |
+ [RuntimeEnabled=WebAnimationsAPI] attribute AnimationEffectReadOnly? effect; |
+ [Measure] attribute double? startTime; |
+ [Measure] attribute double? currentTime; |
+ [Measure] attribute double playbackRate; |
+ [Measure] readonly attribute AnimationPlayState playState; |
+ [Measure, RaisesException] void finish(); |
+ [Measure] void play(); |
+ [Measure] void pause(); |
+ [Measure] void reverse(); |
+ [RuntimeEnabled=WebAnimationsAPI] attribute double startClip; |
+ [RuntimeEnabled=WebAnimationsAPI] attribute double endClip; |
+ |
+ [Measure] void cancel(); |
+ [Measure] attribute EventHandler onfinish; |
+ [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute Promise<Animation> finished; |
+ [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute Promise<Animation> ready; |
}; |