The system timer fires little bit slower than 60fps. This might cause the frame to be missed and hence can lower the frame rate significantly. The CSS animation frame rate on iOS is almost 40fps. The rAF timer was set to 15ms for the same reason. So we need to set the repeated CSS animation timer also to 15ms.
Created attachment 300598 [details] Patch
Created attachment 300744 [details] Patch
Comment on attachment 300744 [details] Patch This seems very fragile. Is the plan to move this toward using the actual display link?
(In reply to comment #3) > Comment on attachment 300744 [details] > Patch > > This seems very fragile. Is the plan to move this toward using the actual > display link? I agree. And this is why I logged and created a patch for https://bugs.webkit.org/show_bug.cgi?id=167720. It makes the CSS animation controller a client of the DisplayRefreshMonitor. Instead of using a repeated timer, the CSS animation controller can schedule for the next display link firing. But we have a bigger plan which will make all kinds of animations be controlled by one central animation controller: https://bugs.webkit.org/show_bug.cgi?id=167899. The goal is be able to align animations with different frame rates properly. So I do not think I am going to land https://bugs.webkit.org/show_bug.cgi?id=167720 since most likely this new code will be removed soon anyway. In the mean time this patch fixes the frame rate of the CSS animation on iOS. We have been using a similar trick for rAF. Please see the definition of MinimumAnimationInterval in WebCore/dom/ScriptedAnimationController.cpp. This fix is just a temporary one which we know it worked in the past.
Comment on attachment 300744 [details] Patch Clearing flags on attachment: 300744 Committed r211748: <http://trac.webkit.org/changeset/211748>
All reviewed patches have been landed. Closing bug.