Skip to content
Permalink
Browse files
[web-animations] provide a dedicated flag for KeyframeEffect.iteratio…
…nComposite

https://bugs.webkit.org/show_bug.cgi?id=240727

Patch by Antoine Quint <graouts@apple.com> on 2022-05-20
Reviewed by Dean Jackson.

Add a dedicated flag for the `KeyframeEffect.iterationComposite` property as
that property did not make it to Web Animations 1.0 and should not be enabled
together with `KeyframeEffect.composite`.

* Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml:

* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::create):
* Source/WebCore/animation/KeyframeEffect.idl:

Canonical link: https://commits.webkit.org/250816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
graouts authored and webkit-commit-queue committed May 20, 2022
1 parent d9f3816 commit 5ab995f5db3b4c24c7a01f9ecc118ef419d569fd
Showing 3 changed files with 14 additions and 2 deletions.
@@ -1576,6 +1576,18 @@ WebAnimationsCustomFrameRateEnabled:
WebCore:
default: false

WebAnimationsIterationCompositeEnabled:
type: bool
humanReadableName: "Web Animations iteration composite"
humanReadableDescription: "Support for the KeyframeEffect.iterationComposite property"
defaultValue:
WebKitLegacy:
default: false
WebKit:
default: false
WebCore:
default: false

WebAnimationsMutableTimelinesEnabled:
type: bool
humanReadableName: "Web Animations mutable timelines"
@@ -519,7 +519,7 @@ ExceptionOr<Ref<KeyframeEffect>> KeyframeEffect::create(JSGlobalObject& lexicalG
keyframeEffectOptions.direction
};

if (document.settings().webAnimationsCompositeOperationsEnabled()) {
if (document.settings().webAnimationsIterationCompositeEnabled()) {
keyframeEffect->setComposite(keyframeEffectOptions.composite);
keyframeEffect->setIterationComposite(keyframeEffectOptions.iterationComposite);
}
@@ -34,7 +34,7 @@ typedef USVString CSSOMString;

attribute Element? target;
attribute CSSOMString? pseudoElement;
[EnabledBySetting=WebAnimationsCompositeOperationsEnabled] attribute IterationCompositeOperation iterationComposite;
[EnabledBySetting=WebAnimationsIterationCompositeEnabled] attribute IterationCompositeOperation iterationComposite;
[EnabledBySetting=WebAnimationsCompositeOperationsEnabled, ImplementedAs=bindingsComposite] attribute CompositeOperation composite;
[Custom] sequence<object> getKeyframes();
[CallWith=CurrentGlobalObject&CurrentDocument, ImplementedAs=setBindingsKeyframes] undefined setKeyframes(object? keyframes);

0 comments on commit 5ab995f

Please sign in to comment.