diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 23251f182ed6..277d278c3f7b 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -301,7 +301,6 @@ bool nsContentUtils::sIsCustomElementsEnabled = false; bool nsContentUtils::sSendPerformanceTimingNotifications = false; bool nsContentUtils::sUseActivityCursor = false; bool nsContentUtils::sAnimationsAPICoreEnabled = false; -bool nsContentUtils::sAnimationsAPIElementAnimateEnabled = false; bool nsContentUtils::sGetBoxQuadsEnabled = false; bool nsContentUtils::sSkipCursorMoveForSameValueSet = false; bool nsContentUtils::sRequestIdleCallbackEnabled = false; @@ -702,9 +701,6 @@ nsContentUtils::Init() Preferences::AddBoolVarCache(&sAnimationsAPICoreEnabled, "dom.animations-api.core.enabled", false); - Preferences::AddBoolVarCache(&sAnimationsAPIElementAnimateEnabled, - "dom.animations-api.element-animate.enabled", false); - Preferences::AddBoolVarCache(&sGetBoxQuadsEnabled, "layout.css.getBoxQuads.enabled", false); diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 5c486af67b98..7dd33772fb91 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2349,14 +2349,6 @@ public: return sAnimationsAPICoreEnabled; } - /* - * Returns true if the DOM Animations Element.animate() API should be enabled. - */ - static bool AnimationsAPIElementAnimateEnabled() - { - return sAnimationsAPIElementAnimateEnabled; - } - /** * Returns true if the getBoxQuads API should be enabled. */ @@ -3415,7 +3407,6 @@ private: static bool sSendPerformanceTimingNotifications; static bool sUseActivityCursor; static bool sAnimationsAPICoreEnabled; - static bool sAnimationsAPIElementAnimateEnabled; static bool sGetBoxQuadsEnabled; static bool sSkipCursorMoveForSameValueSet; static bool sRequestIdleCallbackEnabled; diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 2b6d849512ab..0cf6baae025a 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -3276,16 +3276,6 @@ nsIDocument::GetAllowPlugins() return true; } -bool -nsDocument::IsElementAnimateEnabled(JSContext* aCx, JSObject* /*unused*/) -{ - MOZ_ASSERT(NS_IsMainThread()); - - return nsContentUtils::IsSystemCaller(aCx) || - nsContentUtils::AnimationsAPICoreEnabled() || - nsContentUtils::AnimationsAPIElementAnimateEnabled(); -} - bool nsDocument::IsWebAnimationsEnabled(JSContext* aCx, JSObject* /*unused*/) { diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index b8efc4a35bff..9c45e72fee0a 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -158,7 +158,6 @@ public: virtual void StopDocumentLoad() override; - static bool IsElementAnimateEnabled(JSContext* aCx, JSObject* aObject); static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject); static bool IsWebAnimationsEnabled(mozilla::dom::CallerType aCallerType); diff --git a/dom/webidl/Animatable.webidl b/dom/webidl/Animatable.webidl index 4c1396c99588..01070ea35bf4 100644 --- a/dom/webidl/Animatable.webidl +++ b/dom/webidl/Animatable.webidl @@ -20,7 +20,7 @@ dictionary AnimationFilter { [NoInterfaceObject] interface Animatable { - [Func="nsDocument::IsElementAnimateEnabled", Throws] + [Throws] Animation animate(object? keyframes, optional UnrestrictedDoubleOrKeyframeAnimationOptions options); [Func="nsDocument::IsWebAnimationsEnabled"] diff --git a/dom/webidl/Animation.webidl b/dom/webidl/Animation.webidl index 6ef41bad8628..e45e6f03c390 100644 --- a/dom/webidl/Animation.webidl +++ b/dom/webidl/Animation.webidl @@ -12,8 +12,7 @@ enum AnimationPlayState { "idle", "running", "paused", "finished" }; -[Func="nsDocument::IsElementAnimateEnabled", - Constructor (optional AnimationEffect? effect = null, +[Constructor (optional AnimationEffect? effect = null, optional AnimationTimeline? timeline)] interface Animation : EventTarget { attribute DOMString id; diff --git a/dom/webidl/AnonymousContent.webidl b/dom/webidl/AnonymousContent.webidl index 1ff265219e87..c1037ca55fe0 100644 --- a/dom/webidl/AnonymousContent.webidl +++ b/dom/webidl/AnonymousContent.webidl @@ -62,7 +62,7 @@ interface AnonymousContent { nsISupports? getCanvasContext(DOMString elementId, DOMString contextId); - [Func="nsDocument::IsElementAnimateEnabled", Throws] + [Throws] Animation setAnimationForElement(DOMString elementId, object? keyframes, optional UnrestrictedDoubleOrKeyframeAnimationOptions diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index fad6322683d4..34585d82046a 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -3077,12 +3077,6 @@ pref("dom.animations-api.core.enabled", false); pref("dom.animations-api.core.enabled", true); #endif -// Is support for the Element.animate() function (a subset of the Web Animations -// API) enabled? -// Note that if dom.animations-api.core.enabled is true, this preference is -// ignored. -pref("dom.animations-api.element-animate.enabled", true); - // Pref to throttle offsreen animations pref("dom.animations.offscreen-throttling", true);