diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-14 17:17:28 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-14 17:41:30 +0000 |
commit | 231dd4e890d650497801717a871d16841135dff8 (patch) | |
tree | e6198d4bd0cd2643394960d38026b644b1bdd273 /dom | |
parent | de389016cc7d54fd6cf63a3494379e6af7c8cbc0 (diff) | |
download | uxp-231dd4e890d650497801717a871d16841135dff8.tar.gz |
Issue mcp-graveyard/UXP#1689 - Part 3: Add a preference for animation composite modes.
This feature should not be shipped until the various definitions of addition for
each additive property are properly specified and then implemented accordingly.
Unlike other patches in this series, compositing is not frequently used
internally so there is no need to enable this by default for chrome callers.
Diffstat (limited to 'dom')
-rw-r--r-- | dom/animation/KeyframeEffect.cpp | 5 | ||||
-rw-r--r-- | dom/animation/test/mochitest.ini | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 90230a5b44..090c7019d7 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -10,6 +10,7 @@ #include "mozilla/dom/AnimationEffectTiming.h" #include "mozilla/dom/KeyframeEffectBinding.h" #include "mozilla/KeyframeUtils.h" +#include "mozilla/Preferences.h" #include "nsContentUtils.h" #include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch #include "nsIScriptError.h" @@ -135,9 +136,9 @@ void KeyframeEffect::SetIterationComposite( const IterationCompositeOperation& aIterationComposite) { - // Ignore iterationComposite if the Web Animations API is not enabled, + // Ignore iterationComposite if the API is not enabled, // then the default value 'Replace' will be used. - if (!AnimationUtils::IsCoreAPIEnabledForCaller()) { + if (!Preferences::GetBool("dom.animations-api.compositing.enabled")) { return; } diff --git a/dom/animation/test/mochitest.ini b/dom/animation/test/mochitest.ini index b56136d250..fff62ac7c9 100644 --- a/dom/animation/test/mochitest.ini +++ b/dom/animation/test/mochitest.ini @@ -1,5 +1,6 @@ [DEFAULT] prefs = + dom.animations-api.compositing.enabled=true dom.animations-api.core.enabled=true dom.animations-api.implicit-keyframes.enabled=true dom.animations-api.timelines.enabled=true |