[webkit-changes] [WebKit/WebKit] 0abfa9: [web-animations] support additivity when interpola...
Antoine Quint
noreply at github.com
Thu Dec 15 08:11:40 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0abfa98add77f0105f6911af6a369651915db5fb
https://github.com/WebKit/WebKit/commit/0abfa98add77f0105f6911af6a369651915db5fb
Author: Antoine Quint <graouts at apple.com>
Date: 2022-12-15 (Thu, 15 Dec 2022)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-length-expected.txt
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/animation/CSSPropertyAnimation.h
M Source/WebCore/animation/KeyframeEffect.cpp
Log Message:
-----------
[web-animations] support additivity when interpolating custom properties
https://bugs.webkit.org/show_bug.cgi?id=249386
Reviewed by Antti Koivisto.
In order to account for additivity when interpolating custom properties, we change
CSSPropertyAnimation::isPropertyAdditiveOrCumulative() to use the recently-introduced
variant type to allow for both standard and custom properties to be provided.
In the case of a custom property, the returned value is always true.
This means we can remove the CSSPropertyID variant check in KeyframeEffect::setAnimatedPropertiesInStyle()
and deal with additivity also with custom properties.
Finally, in CSSPropertyAnimation::blendProperty() we ensure that we pass the compositeOperation
parameter down the blending code chain.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-length-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::blendProperty):
(WebCore::CSSPropertyAnimation::isPropertyAdditiveOrCumulative):
* Source/WebCore/animation/CSSPropertyAnimation.h:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
Canonical link: https://commits.webkit.org/257920@main
More information about the webkit-changes
mailing list