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] account for iterationComposite when interpolating cu…
…stom properties https://bugs.webkit.org/show_bug.cgi?id=249394 Reviewed by Antti Koivisto. In order to correctly handle iterationComposite when interpolating custom properties, we update CSSPropertyAnimation::propertyRequiresBlendingForAccumulativeIteration() to take a CSSPropertyAnimation::Property as a parameter such that we can accept a custom property. In the implementation we can check for the custom property type to identify whether it requires blending for iterationComposite. In KeyframeEffect::setAnimatedPropertiesInStyle(), we can then remove the code specific to standard CSS properties when dealing with iterationComposite. * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-color.html: Added. * 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::propertyRequiresBlendingForAccumulativeIteration): * Source/WebCore/animation/CSSPropertyAnimation.h: * Source/WebCore/animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle): Canonical link: https://commits.webkit.org/257925@main
- Loading branch information
Showing
5 changed files
with
61 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/utils.js"></script> | ||
<div id="target"></div> | ||
<script> | ||
|
||
animation_test({ | ||
syntax: "<color>", | ||
inherits: false, | ||
initialValue: "red" | ||
}, { | ||
keyframes: ["blue", "green"], | ||
expected: "rgb(0, 64, 128)" | ||
}, 'Animating a custom property of type <color>'); | ||
|
||
// Need to test accumulation, iterationComposite, etc. | ||
|
||
</script> |
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