Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / webidl / BaseKeyframeTypes.webidl
bloba6e94b1e3ab8272423253f59d1152ee330a92e47
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/#the-compositeoperation-enumeration
8  * https://drafts.csswg.org/web-animations/#dictdef-basepropertyindexedkeyframe
9  * https://drafts.csswg.org/web-animations/#dictdef-basekeyframe
10  * https://drafts.csswg.org/web-animations/#dictdef-basecomputedkeyframe
11  *
12  * Copyright © 2016 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
13  * liability, trademark and document use rules apply.
14  */
16 enum CompositeOperation { "replace", "add", "accumulate" };
18 // NOTE: The order of the values in this enum are important.
20 // We assume that CompositeOperation is a subset of CompositeOperationOrAuto so
21 // that we can cast between the two types (provided the value is not "auto").
23 // If that assumption ceases to hold we will need to update the conversion
24 // in KeyframeUtils::GetAnimationPropertiesFromKeyframes.
25 enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };
27 // The following dictionary types are not referred to by other .webidl files,
28 // but we use it for manual JS->IDL and IDL->JS conversions in KeyframeEffect's
29 // implementation.
31 [GenerateInit]
32 dictionary BasePropertyIndexedKeyframe {
33   (double? or sequence<double?>) offset = [];
34   (UTF8String or sequence<UTF8String>) easing = [];
35   (CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = [];
38 [GenerateInit]
39 dictionary BaseKeyframe {
40   double? offset = null;
41   UTF8String easing = "linear";
42   [Pref="dom.animations-api.compositing.enabled"]
43   CompositeOperationOrAuto composite = "auto";
45   // Non-standard extensions
47   // Member to allow testing when StyleAnimationValue::ComputeValues fails.
48   //
49   // Note that we currently only apply this to shorthand properties since
50   // it's easier to annotate shorthand property values and because we have
51   // only ever observed ComputeValues failing on shorthand values.
52   //
53   // Bug 1216844 should remove this member since after that bug is fixed we will
54   // have a well-defined behavior to use when animation endpoints are not
55   // available.
56   [ChromeOnly] boolean simulateComputeValuesFailure = false;
59 [GenerateConversionToJS]
60 dictionary BaseComputedKeyframe : BaseKeyframe {
61   double computedOffset;