diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index ca9d89298fc1..1e2d61fb7bc5 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -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); diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 72440e6d7ba6..956d5caf1230 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -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; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 405e5c45a750..f50c7d9f0d88 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -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);