[webkit-changes] [WebKit/WebKit] 5b49cc: [iOS] Top safe area is too large after rotating fu...

Jer Noble noreply at github.com
Thu Mar 14 13:01:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5b49cc72181585bf45892391d2d33fd9cf65d4bf
      https://github.com/WebKit/WebKit/commit/5b49cc72181585bf45892391d2d33fd9cf65d4bf
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm

  Log Message:
  -----------
  [iOS] Top safe area is too large after rotating fullscreen to landscape mode
https://bugs.webkit.org/show_bug.cgi?id=270923
rdar://124288251

Reviewed by Aditya Keerthi.

On iPhone, the status bar is hidden in a fullscreen presentation when the device orientation is
landscape. This causes us to skip updating the `_nonZeroStatusBarHeight` in
WKFullScreenViewController, and reserve the space previously held by the status bar and possibly
the camera notch safe area.

When in fullscreen, if the status bar is hidden and we didn't specifically ask it to hide,
don't try to reserve space for it, as it likely won't re-appear.

In order to ensure that the calculated property `-additionalSafeAreaInsets` is re-queried correctly,
mark it as depending on `-prefersStatusBarHidden`, the window's `-safeAreaInsets`, and on the
status bar manager's `-statusBarHidden` property.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(+[WKFullScreenViewController keyPathsForValuesAffectingAdditionalSafeAreaInsets]):
(-[WKFullScreenViewController additionalSafeAreaInsets]):

Canonical link: https://commits.webkit.org/276116@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list