[Webkit-unassigned] [Bug 255852] New: [css-values] Viewport units are often wrong in IABs using WKWebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 23 23:31:04 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=255852

            Bug ID: 255852
           Summary: [css-values] Viewport units are often wrong in IABs
                    using WKWebView
           Product: WebKit
           Version: Safari 16
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: johannes.odland at nrk.no

Created attachment 466060

  --> https://bugs.webkit.org/attachment.cgi?id=466060&action=review

Viewport unit test in Facebook IAB (small viewport)

A common issue in In App Browsers (IABs) is that the viewport units is incorrectly sized. 
One issue seems to be caused by SFSafariViewController having setting the wrong sizes, this is reported here: https://bugs.webkit.org/show_bug.cgi?id=255708

In apps that use WKWebView we have to rely on the app developer setting the sizes correctly. 
The sizes can be set using `setMinimumViewportInset(_:maximumViewportInset:)`: https://developer.apple.com/documentation/webkit/wkwebview/3974127-setminimumviewportinset


Unfortunately, many apps doesn't set the viewport insets for their IABs. 
One example is the Facebook app, where 100vh, 100svh, 100lvh and 100dvh are all updated to be the same height as the current viewport heigh. (They all act as 100dvh).

As these apps have a large user base, these IABs are a major hurdle in adapting the new viewport units. 
It's necessary to build fallbacks for these IABs specifically. 
As 100vh is dynamically sized, they cause reflow when the user is changing scrolling directions. 

Could setting minimum and maximum viewport sizes be enforced?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230424/896b618b/attachment.htm>


More information about the webkit-unassigned mailing list