Bug 1634779 - pt 2. Partially revert Bug 1603006 r=kmag
[gecko.git] / dom / webidl / AnimationEffect.webidl
blob7cd50ce6f01a9d27b0c8d5736d15f4aacc7c8c53
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://drafts.csswg.org/web-animations/#animationeffectreadonly
8  *
9  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 enum FillMode {
14   "none",
15   "forwards",
16   "backwards",
17   "both",
18   "auto"
21 enum PlaybackDirection {
22   "normal",
23   "reverse",
24   "alternate",
25   "alternate-reverse"
28 dictionary EffectTiming {
29   double                              delay = 0.0;
30   double                              endDelay = 0.0;
31   FillMode                            fill = "auto";
32   double                              iterationStart = 0.0;
33   unrestricted double                 iterations = 1.0;
34   (unrestricted double or DOMString)  duration = "auto";
35   PlaybackDirection                   direction = "normal";
36   DOMString                           easing = "linear";
39 dictionary OptionalEffectTiming {
40   double                              delay;
41   double                              endDelay;
42   FillMode                            fill;
43   double                              iterationStart;
44   unrestricted double                 iterations;
45   (unrestricted double or DOMString)  duration;
46   PlaybackDirection                   direction;
47   DOMString                           easing;
50 dictionary ComputedEffectTiming : EffectTiming {
51   unrestricted double   endTime = 0.0;
52   unrestricted double   activeDuration = 0.0;
53   double?               localTime = null;
54   double?               progress = null;
55   unrestricted double?  currentIteration = null;
58 [Func="Document::IsWebAnimationsEnabled",
59  Exposed=Window]
60 interface AnimationEffect {
61   EffectTiming getTiming();
62   [BinaryName="getComputedTimingAsDict"]
63   ComputedEffectTiming getComputedTiming();
64   [Throws]
65   void updateTiming(optional OptionalEffectTiming timing = {});