Bug 279514

Summary: [css-transitions] `getKeyframes()` returns the same values for "from" and "to" with a custom property
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: bramus, graouts, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=279252
https://github.com/web-platform-tests/wpt/pull/48103
Attachments:
Description Flags
Test none

Antoine Quint
Reported 2024-09-11 07:06:52 PDT
Created attachment 472522 [details] Test See the attached test case and notice how transitioning a custom property will yield a CSSTransition with the same reported value for the custom property for both the "from" and "to" keyframe. This simply can't be right, otherwise no transition would be created. It also appears that the computed style for the targeted element is incorrect, which could be the same underlying issue.
Attachments
Test (813 bytes, text/html)
2024-09-11 07:06 PDT, Antoine Quint
no flags
Antoine Quint
Comment 1 2024-09-11 07:31:25 PDT
I think the issue is that we're lacking the equivalent of `ComputedStyleExtractor::valueForPropertyInStyle()` for custom properties and we're wrongly calling `ComputedStyleExtractor::customPropertyValue()` in the `customPropertyValue` lambda under `KeyframeEffect::getKeyframes()`. This means we'll only ever show the current computed value for the target element rather than the keyframe value.
Radar WebKit Bug Importer
Comment 2 2024-09-11 08:02:48 PDT
Antoine Quint
Comment 3 2024-09-11 08:04:05 PDT
Antoine Quint
Comment 4 2024-09-11 08:25:26 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/48103
EWS
Comment 5 2024-09-11 09:14:47 PDT
Committed 283485@main (cd5cb9415972): <https://commits.webkit.org/283485@main> Reviewed commits have been landed. Closing PR #33468 and removing active labels.
EWS
Comment 6 2024-09-18 14:59:19 PDT
Committed 283286.69@safari-7620-branch (fedfc266a326): <https://commits.webkit.org/283286.69@safari-7620-branch> Reviewed commits have been landed. Closing PR #1821 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.