Bug 1859171 - Use AnimationFrameProvider mixin with DedicatedWorkerGlobalScope. r=webidl,emilio

This patch removes the duplicate definitions of requestAnimationFrame
and cancelAnimationFrame in DedicatedWorkerGlobalScope in favour of
using the AnimationFrameProvider mixin. We couldn't before when there
was a worker only pref limitation, but that was removed in another
patch.

This patch has no functional change.

Differential Revision: https://phabricator.services.mozilla.com/D191026
This commit is contained in:
Andrew Osmond 2023-10-16 15:28:28 +00:00
Родитель f23fbd8088
Коммит 4a41fccf9d
1 изменённых файлов: 3 добавлений и 9 удалений

Просмотреть файл

@ -27,15 +27,6 @@ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
// https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
// Ideally we would just include AnimationFrameProvider to add the interface,
// but we cannot make an include conditional.
[Throws]
long requestAnimationFrame(FrameRequestCallback callback);
[Throws]
undefined cancelAnimationFrame(long handle);
};
// https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-methods
@ -43,3 +34,6 @@ partial interface DedicatedWorkerGlobalScope {
[Pref="media.peerconnection.enabled",
Pref="media.peerconnection.scripttransform.enabled"] attribute EventHandler onrtctransform;
};
// https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
DedicatedWorkerGlobalScope includes AnimationFrameProvider;