mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1619276 - Fix the order of the setting of Keyframe options. r=smaug,birtles
Besides, we add the pref setup in the webidl, so if we turn it off, iterationComposite and composite will always be the default values. Differential Revision: https://phabricator.services.mozilla.com/D65437 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
4fc8a0de16
commit
73f98d78b8
@ -724,15 +724,16 @@ template <class OptionsType>
|
||||
static KeyframeEffectParams KeyframeEffectParamsFromUnion(
|
||||
const OptionsType& aOptions, CallerType aCallerType, ErrorResult& aRv) {
|
||||
KeyframeEffectParams result;
|
||||
if (aOptions.IsUnrestrictedDouble() ||
|
||||
// Ignore iterationComposite and composite if the corresponding pref is
|
||||
// not set. The default value 'Replace' will be used instead.
|
||||
!StaticPrefs::dom_animations_api_compositing_enabled()) {
|
||||
if (aOptions.IsUnrestrictedDouble()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
const KeyframeEffectOptions& options =
|
||||
KeyframeEffectOptionsFromUnion(aOptions);
|
||||
|
||||
// If dom.animations-api.compositing.enabled is turned off,
|
||||
// iterationComposite and composite are the default value 'replace' in the
|
||||
// dictionary.
|
||||
result.mIterationComposite = options.mIterationComposite;
|
||||
result.mComposite = options.mComposite;
|
||||
|
||||
|
@ -16,7 +16,9 @@ enum IterationCompositeOperation {
|
||||
};
|
||||
|
||||
dictionary KeyframeEffectOptions : EffectTiming {
|
||||
[Pref="dom.animations-api.compositing.enabled"]
|
||||
IterationCompositeOperation iterationComposite = "replace";
|
||||
[Pref="dom.animations-api.compositing.enabled"]
|
||||
CompositeOperation composite = "replace";
|
||||
DOMString? pseudoElement = null;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user