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] custom properties should support interpolation with …
…a single keyframe https://bugs.webkit.org/show_bug.cgi?id=249384 Reviewed by Antti Koivisto. Custom properties can specify an initial value when registered. However, that value is not available in RenderStyle if the custom property is not provided with an explicit value. This means that when we added basic support for interpolating custom properties in bug 249312, we would fail to gather the right values for interpolating as we'd have a null value if the keyframes did not set explicit values. We can get to the initial value of a custom property through the custom property registry held by the document. So we add a new document() method to CSSPropertyBlendingClient such that we may be able to read from this registry when interpolating from within CSSPropertyAnimation. Then we add a static method customPropertyValuesForBlending that returns a pair of CSSCustomPropertyValue pointers containing either the explicit value set for a custom property, or its initial value. Now we are guaranteed to get the correct values when interpolating. * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-length-expected.txt: * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::blendCustomProperty): * Source/WebCore/animation/CSSPropertyBlendingClient.h: * Source/WebCore/animation/KeyframeEffect.h: Canonical link: https://commits.webkit.org/257911@main
- Loading branch information
Showing
4 changed files
with
28 additions
and
8 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
PASS Animating a custom property of type <length> | ||
FAIL Animating a custom property of type <length> with a single keyframe assert_equals: expected "150px" but got "100px" | ||
PASS Animating a custom property of type <length> with a single keyframe | ||
FAIL Animating a custom property of type <length> with additivity assert_equals: expected "350px" but got "250px" | ||
FAIL Animating a custom property of type <length> with a single keyframe and additivity assert_equals: expected "250px" but got "100px" | ||
FAIL Animating a custom property of type <length> with a single keyframe and additivity assert_equals: expected "250px" but got "200px" | ||
FAIL Animating a custom property of type <length> with iterationComposite assert_equals: expected "250px" but got "50px" | ||
|
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