Bug 1412765 - Add dom.animations-api.pending-member.enabled, defaulting to false; r=hiro

MozReview-Commit-ID: 7P34nAI7apB

--HG--
extra : rebase_source : 94cf46522b995c40b1649a4d8ce44cd868026869
This commit is contained in:
Brian Birtles 2017-11-21 09:43:40 +09:00
parent f0d71f5a55
commit bad7dc839d
3 changed files with 19 additions and 0 deletions

View File

@ -303,6 +303,7 @@ bool nsContentUtils::sSendPerformanceTimingNotifications = false;
bool nsContentUtils::sUseActivityCursor = false;
bool nsContentUtils::sAnimationsAPICoreEnabled = false;
bool nsContentUtils::sAnimationsAPIElementAnimateEnabled = false;
bool nsContentUtils::sAnimationsAPIPendingMemberEnabled = false;
bool nsContentUtils::sGetBoxQuadsEnabled = false;
bool nsContentUtils::sSkipCursorMoveForSameValueSet = false;
bool nsContentUtils::sRequestIdleCallbackEnabled = false;
@ -714,6 +715,10 @@ nsContentUtils::Init()
Preferences::AddBoolVarCache(&sAnimationsAPIElementAnimateEnabled,
"dom.animations-api.element-animate.enabled", false);
Preferences::AddBoolVarCache(&sAnimationsAPIPendingMemberEnabled,
"dom.animations-api.pending-member.enabled",
false);
Preferences::AddBoolVarCache(&sGetBoxQuadsEnabled,
"layout.css.getBoxQuads.enabled", false);

View File

@ -2347,6 +2347,15 @@ public:
return sAnimationsAPIElementAnimateEnabled;
}
/**
* Returns true if the DOM Animations API should report a pending animation
* using the separate 'pending' member instead of the 'playState' member.
*/
static bool AnimationsAPIPendingMemberEnabled()
{
return sAnimationsAPIPendingMemberEnabled;
}
/**
* Returns true if the getBoxQuads API should be enabled.
*/
@ -3415,6 +3424,7 @@ private:
static bool sUseActivityCursor;
static bool sAnimationsAPICoreEnabled;
static bool sAnimationsAPIElementAnimateEnabled;
static bool sAnimationsAPIPendingMemberEnabled;
static bool sGetBoxQuadsEnabled;
static bool sSkipCursorMoveForSameValueSet;
static bool sRequestIdleCallbackEnabled;

View File

@ -3096,6 +3096,10 @@ pref("dom.animations-api.core.enabled", true);
// ignored.
pref("dom.animations-api.element-animate.enabled", true);
// Is the pending state reported using a separate 'pending' member of the
// Animation interface as opposed to the 'playState' member?
pref("dom.animations-api.pending-member.enabled", false);
// Pref to throttle offsreen animations
pref("dom.animations.offscreen-throttling", true);