Bug 272226

Summary: [macOS, iOS, & iPadOS] The “Prefer … 60 fps” Feature Flag does not affect PWAs, Preventing native fps
Product: WebKit Reporter: Jeffrey Blanz <possum.bracing0v>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: formularsumo, luming_yin, mark, possum.bracing0v, simon.fraser, tomac, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: All   
OS: iOS 18   
Attachments:
Description Flags
Framerate Capped near 60fps none

Description Jeffrey Blanz 2024-04-05 07:52:22 PDT
In PWA apps, 120fps is disabled regardless of the "Prefer Page Rendering Updates Near 60fps" feature flag on 2018 iPad Pros and iPhone 13 Pros or newer. 

Note: 120fps is enabled for MacBook Pro PWAs, but not iPhone Pros or iPad Pros.
Comment 1 Jeffrey Blanz 2024-04-05 07:54:32 PDT
A related bug that also prevents this is "Prefer Page Rendering Updates Near 60fps Feature Flag doesn’t work on iPhone Pros"

120hz animations are not supported on iPhone Pros. They are supported on iPad Pros and MacBook Pros.
Comment 2 Jeffrey Blanz 2024-04-08 08:17:05 PDT
This may not actually be the case. I believe this is caused by WebRTC not supporting 120fps stream decoding on iPadOS and iOS (and most likely 90fps for Vision Pro). This is likely what I saw that made me think PWAs do not support 120fps.

Although if PWAs don’t support 120fps on iPadOS and iOS then that would also cause this. If a Apple developer could confirm and I will mark as resolved and post a bug report for WebRTC instead.
Comment 3 Jeffrey Blanz 2024-04-09 07:14:55 PDT
Still unsure if PWAs support 120fps scrolling and animations. This could be because the "Prefer Page Rendering Updates Near 60fps" is default on for iPhone and iPads. It is also default on for MacBooks pros, but after disabling it I was able to verify 120 fps PWA support.

I have also have yet to find a PWA for iPads that even has some sort of a FPS test like https://www.testufo.com does.

Like stated before, I will mark this resolved if someone can confirm PWAs support 120fps. You will only be able to verify this on iPad Pros with promotion because currently iPhone Pros with promotion do not support 120fps animations.


I did file a bug report for webRTC 120fps support here:
https://bugs.webkit.org/show_bug.cgi?id=272393
Comment 4 Jeffrey Blanz 2024-04-11 07:57:50 PDT
I have confirmed this is because "Prefer Page Rendering Updates Near 60fps" is on by default in the system. Since PWAs run based on system defaults, and not based off of feature flags, 120fps is disabled and there is nothing users can do to change it.

This is default on for safari 17.5 for MacBook Pros, iPad Pros, and iPhone Pros.

Note: This is not default on for the Vision Pro, it is actually the only case where the feature flag is default off.
Comment 5 Radar WebKit Bug Importer 2024-04-12 07:53:32 PDT
<rdar://problem/126349553>
Comment 6 Jeffrey Blanz 2024-04-24 06:35:24 PDT
Created attachment 471103 [details]
Framerate Capped near 60fps

To test this you can open www.testufo.com by clicking on the link in a PWA and choosing open in a new window. It should launch www.testufo.com in a new PWA window, it should not open www.testufo.com in a browser.

For example, I messaged someone on X the link to test ufo and then opened the link in a new window from the X PWA.
Comment 7 Jeffrey Blanz 2024-04-24 06:58:18 PDT
Easier way to Replicate:

1. Open safari or safari technology preview

2. Go to www.reddit.com

3. Hit share and add to dock

4. Open the Reddit PWA added to the dock

5. In the search bar search "testufo Link - ignore". You should see a post with that title by u/jeff03blue_instinct.

6. Click on the post to open it.

7. Right click on the link in the post and choose "Open Link in New Window"

8. You should now see www.testufo.com running in a reddit PWA window at 60fps.
Comment 8 mdrejhon 2024-05-19 17:32:40 PDT
This could be another solution:

https://bugs.webkit.org/show_bug.cgi?id=274372
Comment 9 Jeffrey Blanz 2024-07-01 07:50:35 PDT
Some feature flags affect PWAs. It would be nice if the “Prefer Page Rendering Updates near 60FPS” flag also affected PWAs. You can test this on macOS and see that it does not affect PWAs. The steps to replicate, and a screenshot showing the flag not affecting PWAs is above.

For example, you can check the Face Detection demo from PWA today. If the demo says it's not available; you can enable Shape Detection API in Safari feature flags, relaunch the  PWA, and see it working.

Link to demo: https://whatpwacando.today/face-detection/