Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[web-animations] support custom properties in JS-originated animations
https://bugs.webkit.org/show_bug.cgi?id=242005 Reviewed by Dean Jackson. Add support for custom properties in JS-originated animations as created via the Element.animate() method, the KeyframeEffect constructor and the KeyframeEffect.setKeyframes() method. We add the notion of a custom property while parsing, first in the PropertyAndValues which is used as an intermediary object while parsing, and then in ComputedKeyframe which is stored on the KeyframeEffect as the final parsed data structure and as returned through getKeyframes(). The code changes themselves are pretty straightforward where everywhere we handle a CSSPropertyID we add code to handle custom properties. And since we now explicitly allow a CSSPropertyCustom property to sneak through, we add guards where necessary if that would otherwise be unexpected, for instance in WebAnimation::commitStyles() until we handle custom properties there in a future patch. This change gives us 6 new PASS results as well as modified FAIL results where the KeyframeEffect.setKeyframes() method is used to set keyframes with custom properties which simply had no effect before. * LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-important-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt: * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimation::isPropertyAnimatable): * Source/WebCore/animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::CSSPropertyIDToIDLAttributeName): (WebCore::IDLAttributeNameToAnimationPropertyName): (WebCore::processKeyframeLikeObject): (WebCore::processIterableKeyframes): (WebCore::processPropertyIndexedKeyframes): (WebCore::KeyframeEffect::copyPropertiesFromSource): (WebCore::KeyframeEffect::getKeyframes): * Source/WebCore/animation/KeyframeEffect.h: * Source/WebCore/animation/WebAnimation.cpp: (WebCore::WebAnimation::commitStyles): * Source/WebCore/bindings/js/JSKeyframeEffectCustom.cpp: (WebCore::JSKeyframeEffect::getKeyframes): Canonical link: https://commits.webkit.org/251856@main
- Loading branch information
Showing
10 changed files
with
76 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters