Issue #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.
This commit is contained in:
Moonchild 2021-01-14 17:17:28 +00:00 committed by roytam1
commit fdeb68f0b8
4 changed files with 8 additions and 5 deletions

View file

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