Bug 1475162 - Drop dom.animations-api.element-animate.enabled pref; r=bz

MozReview-Commit-ID: 5xKS30NmNbL

--HG--
extra : rebase_source : c34e8da8a04bee15d40c719db5e57037899cddd8
This commit is contained in:
Brian Birtles 2018-07-12 15:56:05 +09:00
parent ee7030befa
commit a2a2e0da37
8 changed files with 3 additions and 34 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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*/)
{

View File

@ -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);

View File

@ -20,7 +20,7 @@ dictionary AnimationFilter {
[NoInterfaceObject]
interface Animatable {
[Func="nsDocument::IsElementAnimateEnabled", Throws]
[Throws]
Animation animate(object? keyframes,
optional UnrestrictedDoubleOrKeyframeAnimationOptions options);
[Func="nsDocument::IsWebAnimationsEnabled"]

View File

@ -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;

View File

@ -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

View File

@ -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);