Summary: | [iOS] window.screen.{width, height} are incorrect on iPhone 12 in WKWebView | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ali Juma <ajuma> | ||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | bfulgham, kirill.kandalov, simon.fraser, thorton, webkit-bug-importer, zalan | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.chromium.org/p/chromium/issues/detail?id=1172787 | ||||||||
Attachments: |
|
Description
Ali Juma
2021-02-02 12:09:38 PST
Created attachment 428532 [details]
screenshot WebKit ToT
I am seeing 375x812 on trunk WebKit.
(In reply to zalan from comment #2) > Created attachment 428532 [details] > screenshot WebKit ToT > > I am seeing 375x812 on trunk WebKit. In Safari that is. Do you check with "Zoom" feature on or off? As it affects the values that you'll see. Check this article that states when each resolutions should appear: https://hacknicity.medium.com/how-ios-apps-adapt-to-the-various-iphone-12-screen-sizes-e45c021e1b8b "Standard Zoom Unlike the iPhone 12 mini, the iPhone 12 and 12 Pro introduce a completely new resolution of 390×844 points at their native resolution" And "Apps built with Xcode 12.0 or earlier will see a zoomed up iPhone 11 Pro resolution of 375×812 when run on the iPhone 12 or 12 Pro at its native resolution" BTW all the internet is full of claiming that iOS window should be 390x844. E.g. https://yesviz.com/devices/iphone-12/ https://useyourloaf.com/blog/iphone-12-screen-sizes/ Back to the bug, is the wrong resolution in non-Safari WKWebView due to compilation with old XCode or for other reason (i.e. bug)? I re-tested on the currently shipping versions of Chrome, Firefox, and Edge on iOS, and they all now show the same result as Safari on iOS 14.5 (390x844). For Chrome at least, this seems to have been fixed by building with Xcode 12.1+ rather than Xcode 12.0. I think the only thing remaining to figure out here is Comment 2, that is, why trunk WebKit is reporting 375x812 rather than 390x844. |