Bug 263996

Summary: REGRESSION (iOS 17): Animation flicker with multiple accelerated animations and direction change
Product: WebKit Reporter: Liam DeBeasi <ldebeasi>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: darryl.noakes, dino, graouts, graouts, karlcow, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Code reproduction
none
Simplified test case none

Liam DeBeasi
Reported 2023-10-31 14:19:56 PDT
Created attachment 468433 [details] Code reproduction Starting in iOS 17.0 having multiple accelerated animations on the same element causes a flicker when changing the direction. Steps to reproduce: 1. Open attached reproduction on a device running iOS 17.0+. 2. Tap "Run Animation". Observe that the square translates from the bottom of the screen to the top. 3. Drag the red square. The square should move with your pointer. 4. Release your pointer. Observe that the square jumps to the top of the screen before returning to its previous position and translating to the top of the screen. Expected Behavior: I expect the square to remain in its last position before translating to the top of the screen when I remove my pointer. Actual Behavior: The square jumps to the top of the screen, then returns to its last position before translating to the top of the screen when I remove my pointer. Other Info: - I am able to reproduce this starting on iOS 17.0 - I can reproduce this on Safari 17 on macOS
Attachments
Code reproduction (1.96 KB, text/html)
2023-10-31 14:19 PDT, Liam DeBeasi
no flags
Simplified test case (1.50 KB, text/html)
2023-11-01 15:00 PDT, Liam DeBeasi
no flags
Radar WebKit Bug Importer
Comment 1 2023-11-01 14:21:29 PDT
Alexey Proskuryakov
Comment 2 2023-11-01 14:26:28 PDT
FWIW, I'm observing many inconsistent behaviors on this test case, and it doesn't work in Chrome at all, ao this is a little confusing. - sometimes it starts animating from bottom to top repeatedly - sometimes is also flickers when doing that - it follows mouse pointer even without clicking, but only to half of the screen But I don't think that I can see the reported actual behavior with macOS 14.2 beta.
Liam DeBeasi
Comment 3 2023-11-01 15:00:20 PDT
Created attachment 468449 [details] Simplified test case Here's a simplified test case so you can compare the behavior across browsers. Steps to reproduce: 1. Open test case on Safari 17 for iOS or macOS. 2. Click "Run Animation". Observe that the square translates from the bottom of the screen to the top. 3. After 500ms, observe that the square jumps half way down the screen. 4. After another 500ms, observe that the square briefly flickers at the top of the screen before animating up from the middle of the screen. I expect the square to not briefly flicker at the top of the screen in step 4.
Antoine Quint
Comment 4 2023-11-02 13:13:34 PDT
On Sonoma, this used to work as of 262485@main but fails as of 266113@main (ToT as of this writing).
Antoine Quint
Comment 5 2023-11-03 02:49:42 PDT
I think I must have been confused, I'm now seeing the same behavior on Sonoma and Ventura. I did some digging and the behavior of the "simplified test case" changed in this way: - prior to 262875@main things looked as expected - 262875@main regressed the animation such that there would not be an animation for the second part - 265909@main fixed that regression but the flicker issue appears
Antoine Quint
Comment 6 2024-01-18 10:29:25 PST
As it stands with a ToT build (273181@main) the flashing happens most of the time but not always. Will be looking at this next.
Antoine Quint
Comment 7 2024-03-06 01:47:15 PST
This does not happen with threaded animation resolution enabled.
Antoine Quint
Comment 8 2024-03-06 08:52:57 PST
I have a fix for this but writing a test might be tricky due to the very time-sensitive nature of this bug which only appears for a single frame.
Antoine Quint
Comment 9 2024-03-06 10:01:44 PST
EWS
Comment 10 2024-03-06 22:26:56 PST
Committed 275773@main (9d57f1f6519a): <https://commits.webkit.org/275773@main> Reviewed commits have been landed. Closing PR #25540 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.