diff --git a/animation-worklet/idlharness.any.js b/animation-worklet/idlharness.any.js new file mode 100644 index 00000000000000..e821a2fee8a3ac --- /dev/null +++ b/animation-worklet/idlharness.any.js @@ -0,0 +1,17 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +// https://wicg.github.io/animation-worklet/ + +idl_test( + ['animation-worklet'], + ['worklets', 'web-animations', 'html', 'cssom', 'dom'], + idl_array => { + idl_array.add_objects({ + WorkletAnimation: ['new WorkletAnimation("name")'], + // TODO: WorkletGroupEffect + }); + } +); diff --git a/animation-worklet/interfaces.any.js b/animation-worklet/interfaces.any.js deleted file mode 100644 index 9b1d75649a0989..00000000000000 --- a/animation-worklet/interfaces.any.js +++ /dev/null @@ -1,16 +0,0 @@ -// META: script=/resources/WebIDLParser.js -// META: script=/resources/idlharness.js - -'use strict'; - -// https://wicg.github.io/animation-worklet/ - -promise_test(async () => { - const idl = await (await fetch('/interfaces/animation-worklet.idl')).text(); - const html = await (await fetch('/interfaces/html.idl')).text(); - const idlArray = new IdlArray(); - idlArray.add_idls(idl); - idlArray.add_dependency_idls(html); - idlArray.test(); - done(); -}, 'Test driver'); diff --git a/interfaces/animation-worklet.idl b/interfaces/animation-worklet.idl index e0f5fc2ec200c5..58d0bc51a67be5 100644 --- a/interfaces/animation-worklet.idl +++ b/interfaces/animation-worklet.idl @@ -1,35 +1,31 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "CSS Animation Worklet API" spec. -// See: https://wicg.github.io/animation-worklet/ +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: CSS Animation Worklet API (https://wicg.github.io/animation-worklet/) -partial interface Window { +partial namespace CSS { [SameObject] readonly attribute Worklet animationWorklet; }; -callback VoidFunction = void (); - [ Exposed=AnimationWorklet, Global=AnimationWorklet ] interface AnimationWorkletGlobalScope : WorkletGlobalScope { void registerAnimator(DOMString name, VoidFunction animatorCtor); }; [Constructor (DOMString animatorName, - optional (AnimationEffectReadOnly or sequence)? effects = null, + optional (AnimationEffect or sequence)? effects = null, optional AnimationTimeline? timeline, optional any options)] interface WorkletAnimation : Animation { readonly attribute DOMString animatorName; }; -interface WorkletGroupEffectReadOnly : GroupEffectReadOnly {}; - -interface WorkletGroupEffect : WorkletGroupEffectReadOnly {}; -WorkletGroupEffect implements AnimationEffectMutable; -WorkletGroupEffect implements GroupEffectMutable; +interface WorkletGroupEffect { + sequence getChildren(); +}; [Exposed=AnimationWorklet] -partial interface AnimationEffectReadOnly { +partial interface AnimationEffect { // Intended for use inside Animation Worklet scope to drive the effect. attribute double localTime; };