Bug 242312

Summary: requestAnimationFrame is not called after a certain WKWebView magnification
Product: WebKit Reporter: Felix Franz <felix>
Component: AnimationsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: dino, graouts, graouts, kkinnunen, sabouhallawa, simon.fraser, smoley, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   
Attachments:
Description Flags
Xcode project showing the issue none

Felix Franz
Reported 2022-07-04 06:08:34 PDT
Created attachment 460651 [details] Xcode project showing the issue In our application (MacOS-application using WKWebView), we have an issue where after a certain magnification requestAnimationFrame-handlers are not called anymore (or very very rarely). I tried to strip down the issue and was able to reproduce it in a simple Cocoa-Application using a WKWebView which displays a web page. Steps to reproduce: * build and open the attached Xcode project * you see some elements and a red cell with an updating number in it * Click on the "zoom in"-button (and make sure you see the updating number) * Starting from a magnification of 3 (you can see the magnification in the lower right corner) the number stops updating * zoom out again and it starts again. the requestAnimationFrame handler is set in the viewer.html. If I use a simpler web page (only a one html with the same, or using a iframe it works as expected).
Attachments
Xcode project showing the issue (57.96 KB, application/zip)
2022-07-04 06:08 PDT, Felix Franz
no flags
Radar WebKit Bug Importer
Comment 1 2022-07-05 09:47:55 PDT
Smoley
Comment 2 2022-07-08 14:32:20 PDT
Thanks for filing, this does not reproduce for me on macOS 12.5 beta 5 (21G5063a). I stopped zooming in around 25. Are you able to reproduce this on that build?
Simon Fraser (smfr)
Comment 3 2022-07-08 14:44:39 PDT
I can reproduce. You have to scroll sideways a little to get into the state where it stops animating.
Simon Fraser (smfr)
Comment 4 2022-07-08 14:56:41 PDT
The visibleRect passed to `FrameView::updateScriptedAnimationsAndTimersThrottlingState` is wrong. We should just change this code to use an internal IntersectionObserver.
Note You need to log in before you can comment on or make changes to this bug.