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.
[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.