Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c3591d297f097a553bbf668e6096d96fb62e546d
https://github.com/WebKit/WebKit/commit/c3591d297f097a553bbf668e6096d96fb62e546d
Author: Antoine Quint <[email protected]>
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/CSSPropertyBlendingClient.h
M Source/WebCore/animation/KeyframeEffect.h
Log Message:
-----------
[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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes