From a2a2e0da37800aae23b12e8af580af37eaae0fee Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Thu, 12 Jul 2018 15:56:05 +0900 Subject: [PATCH] Bug 1475162 - Drop dom.animations-api.element-animate.enabled pref; r=bz MozReview-Commit-ID: 5xKS30NmNbL --HG-- extra : rebase_source : c34e8da8a04bee15d40c719db5e57037899cddd8 --- dom/base/nsContentUtils.cpp | 4 ---- dom/base/nsContentUtils.h | 9 --------- dom/base/nsDocument.cpp | 10 ---------- dom/base/nsDocument.h | 1 - dom/webidl/Animatable.webidl | 2 +- dom/webidl/Animation.webidl | 3 +-- dom/webidl/AnonymousContent.webidl | 2 +- modules/libpref/init/all.js | 6 ------ 8 files changed, 3 insertions(+), 34 deletions(-) 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);