mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
79e0ffc100
Add KeyframeEffectOptions in KeyframeEffect.webidl --HG-- extra : rebase_source : 1d85d91614f7788b42105e32c043e9e9851d48ba extra : amend_source : acbe1dee541e21df9b9409dbdab9ddc092186564
54 lines
2.0 KiB
Plaintext
54 lines
2.0 KiB
Plaintext
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* The origin of this IDL file is
|
|
* http://w3c.github.io/web-animations/#the-keyframeeffect-interfaces
|
|
*
|
|
* Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
* liability, trademark and document use rules apply.
|
|
*/
|
|
|
|
enum IterationCompositeOperation {
|
|
"replace",
|
|
"accumulate"
|
|
};
|
|
|
|
dictionary KeyframeEffectOptions : AnimationEffectTimingProperties {
|
|
IterationCompositeOperation iterationComposite = "replace";
|
|
CompositeOperation composite = "replace";
|
|
DOMString spacing = "distribute";
|
|
};
|
|
|
|
// For the constructor:
|
|
//
|
|
// 1. We use Element? for the first argument since we don't support Animatable
|
|
// for pseudo-elements yet.
|
|
//
|
|
// 2. We use object? instead of
|
|
//
|
|
// (PropertyIndexedKeyframes or sequence<Keyframe> or SharedKeyframeList)
|
|
//
|
|
// for the second argument so that we can get the property-value pairs from
|
|
// the PropertyIndexedKeyframes or Keyframe objects. We also don't support
|
|
// SharedKeyframeList yet.
|
|
[HeaderFile="mozilla/dom/KeyframeEffect.h",
|
|
Func="nsDocument::IsWebAnimationsEnabled",
|
|
Constructor(Element? target,
|
|
optional object? frames,
|
|
optional (unrestricted double or KeyframeEffectOptions) options)]
|
|
interface KeyframeEffectReadOnly : AnimationEffectReadOnly {
|
|
readonly attribute Element? target;
|
|
readonly attribute IterationCompositeOperation iterationComposite;
|
|
readonly attribute CompositeOperation composite;
|
|
readonly attribute DOMString spacing;
|
|
|
|
// Not yet implemented:
|
|
// KeyframeEffect clone();
|
|
|
|
// We use object instead of ComputedKeyframe so that we can put the
|
|
// property-value pairs on the object.
|
|
[Throws] sequence<object> getFrames();
|
|
};
|