From 4a41fccf9d4eda0f065a8037b2d331f9ce82ce14 Mon Sep 17 00:00:00 2001 From: Andrew Osmond Date: Mon, 16 Oct 2023 15:28:28 +0000 Subject: [PATCH] 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 --- dom/webidl/DedicatedWorkerGlobalScope.webidl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dom/webidl/DedicatedWorkerGlobalScope.webidl b/dom/webidl/DedicatedWorkerGlobalScope.webidl index 4b6b99a87e30..bd772b2e01bb 100644 --- a/dom/webidl/DedicatedWorkerGlobalScope.webidl +++ b/dom/webidl/DedicatedWorkerGlobalScope.webidl @@ -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;