mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
c2e4c54592
Since getFrames() must gather all properties set at a given keyframe offset time for a given easing function, we need to provide a total ordering for ComputedTimingFunction objects. Until the spec defines how to do this, we sort first by NS_STYLE_TRANSITION_TIMING_FUNCTION_* value, then second by the four values in a cubic-bezier() function (in order) or the integer and optional keyword in a steps() function. Because we don't support automatic spacing of keyframes yet, ComputedKeyFrame.computedOffset is always the same as Keyframe.offset. Another assumption made is that the value of easing for a Keyframe object at 100% should be the same as the value from the previous Keyframe for the same property. An alternative would be to leave off easing from that Keyframe, which would need the default value for that IDL dictionary member removed (otherwise it would always be set to "linear").
27 lines
1.1 KiB
Plaintext
27 lines
1.1 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.
|
|
*/
|
|
|
|
[HeaderFile="mozilla/dom/KeyframeEffect.h",
|
|
Func="nsDocument::IsWebAnimationsEnabled"]
|
|
interface KeyframeEffectReadOnly : AnimationEffectReadOnly {
|
|
readonly attribute Element? target;
|
|
// Not yet implemented:
|
|
// readonly attribute IterationCompositeOperation iterationComposite;
|
|
// readonly attribute CompositeOperation composite;
|
|
// readonly attribute DOMString spacing;
|
|
// KeyframeEffect clone();
|
|
|
|
// We use object instead of ComputedKeyframe so that we can put the
|
|
// property-value pairs on the object.
|
|
[Throws] sequence<object> getFrames();
|
|
};
|