Bug 248152

Summary: [web-animations] keyframes should be recomputed when a parent element changes value for a non-inherited property set to "inherit"
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, graouts, karlcow, koivisto, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 251433    
Bug Blocks:    
Attachments:
Description Flags
Test none

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.