Bug 248152 - [web-animations] keyframes should be recomputed when a parent element changes value for a non-inherited property set to "inherit"
Summary: [web-animations] keyframes should be recomputed when a parent element changes...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on: 251433
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-20 11:37 PST by Antoine Quint
Modified: 2023-01-31 14:06 PST (History)
5 users (show)

See Also:


Attachments
Test (694 bytes, text/html)
2022-11-20 11:45 PST, Antoine Quint
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2022-11-20 11:37:38 PST
We are failing a number of WPT tests where a keyframes uses an "inherit" value for a given property and that property changes on a parent dynamically. For instance, in web-animations/responsive/perspective.html:

test(function() {
    container.style.perspective = 'none';
    var player = element.animate([{perspective: 'inherit'}, {perspective: '20px'}], 4000);
    player.pause();

    player.currentTime = 1000;
    assert_equals(getComputedStyle(element).perspective, 'none');

    container.style.perspective = '100px';
    assert_equals(getComputedStyle(element).perspective, '80px');

    container.style.perspective = 'none';
    assert_equals(getComputedStyle(element).perspective, 'none');
}, 'perspective responsive to inherited changes');

This makes us fail a number of similar WPT tests under web-animations/responsive/.
Comment 1 Antoine Quint 2022-11-20 11:45:34 PST
Created attachment 463630 [details]
Test

Adding a standalone test using a CSS animation.
Comment 2 Antoine Quint 2022-11-20 11:47:05 PST
Currently this seems to only work in Chrome (Canary anyway).
Comment 3 Radar WebKit Bug Importer 2022-11-27 11:38:16 PST
<rdar://problem/102694235>
Comment 4 Antoine Quint 2023-01-31 06:11:35 PST
Pull request: https://github.com/WebKit/WebKit/pull/9381
Comment 5 EWS 2023-01-31 14:06:08 PST
Committed 259645@main (25ead8e66edd): <https://commits.webkit.org/259645@main>

Reviewed commits have been landed. Closing PR #9381 and removing active labels.