Bug 204805 - CSS animation skip frames if a sibling slot and/or assigned element is removed during animation
Summary: CSS animation skip frames if a sibling slot and/or assigned element is remove...
Status: RESOLVED DUPLICATE of bug 201048
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.14
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2019-12-03 11:42 PST by Tim Guan-tin Chien [:timdream]
Modified: 2020-02-06 14:51 PST (History)
14 users (show)

See Also:


Attachments
slotted-element-animation.html (1.51 KB, text/html)
2019-12-03 11:42 PST, Tim Guan-tin Chien [:timdream]
no flags Details
slotted-element-animation-no-sr.html (1.08 KB, text/html)
2019-12-03 11:42 PST, Tim Guan-tin Chien [:timdream]
no flags Details
test case that reproes the bug without any shadow trees (991 bytes, text/html)
2020-02-03 04:08 PST, Antti Koivisto
no flags Details
wip (5.15 KB, patch)
2020-02-03 06:10 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Guan-tin Chien [:timdream] 2019-12-03 11:42:09 PST
Created attachment 384730 [details]
slotted-element-animation.html

STR: See test case slotted-element-animation.html.

Expected result: I should see the same animation as the test case slotted-element-animation-no-sr.html

Actual: Frames are skipped for quite some time on the test case. The element no longer animates.

Note: Chrome and Firefox works fine.

Version: STP Release 96 (Safari 13.1, WebKit 14609.1.9.7) macOS 10.14.6 (18G1012)
Comment 1 Tim Guan-tin Chien [:timdream] 2019-12-03 11:42:25 PST
Created attachment 384731 [details]
slotted-element-animation-no-sr.html
Comment 2 Radar WebKit Bug Importer 2019-12-03 11:42:51 PST
<rdar://problem/57597579>
Comment 3 Antoine Quint 2019-12-03 13:34:01 PST
Sounds similar to bug 201048.
Comment 4 Antti Koivisto 2020-02-03 02:04:36 PST
This only happens with pure accelerated animations. Adding a color animation to the test case makes it work.
Comment 5 Antti Koivisto 2020-02-03 02:37:46 PST
The underlying problem seems to be that we tear down and reconstruct the renderer when an animation is in progress but then fail to restart the animation on the new renderer/layer. 

Slots and shadow trees are incidental, they just trigger the wider-than-usual teardown.
Comment 6 Antti Koivisto 2020-02-03 02:46:32 PST
Though it would also be good to avoid overly wide render tree updates on slot changes.
Comment 7 Antti Koivisto 2020-02-03 04:08:03 PST
Created attachment 389498 [details]
test case that reproes the bug without any shadow trees
Comment 8 Antti Koivisto 2020-02-03 04:09:15 PST
This test case sets ::first-letter on body to cause render tree rebuild and break the accelerated animation. Works fine in Firefox and Chrome.
Comment 9 Antti Koivisto 2020-02-03 06:10:50 PST
Created attachment 389502 [details]
wip
Comment 10 Antti Koivisto 2020-02-03 06:55:06 PST
The patch also fixes 204805, duping to the older bug.

*** This bug has been marked as a duplicate of bug 201048 ***