[webkit-changes] [WebKit/WebKit] d6f850: [iOS] Add screen orientation locking / unlocking s...

Chris Dumez noreply at github.com
Fri Oct 14 14:22:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d6f850a7728e6788cfd4947b40ca5ec45976bc7a
      https://github.com/WebKit/WebKit/commit/d6f850a7728e6788cfd4947b40ca5ec45976bc7a
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.h
    M Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.cpp
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

  Log Message:
  -----------
  [iOS] Add screen orientation locking / unlocking support outside layout tests
https://bugs.webkit.org/show_bug.cgi?id=246435

Reviewed by Wenson Hsieh.

Add screen orientation locking / unlocking support outside layout tests, on iOS
devices. Outside tests, the fullscreen API uses the WKFullScreenWindowController
to display a new fullscreen view on top of the current one. This new view has its
own UIViewController that WebKit controls. As a result, when locking the screen
orientation (which is gated on being in fullscreen), we need to do so via the
WKFullScreenWindowController, instead of relying on the client application.

* Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::lockFullscreenOrientation):
(WebKit::WebFullScreenManagerProxy::unlockFullscreenOrientation):
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:
(WebKit::WebFullScreenManagerProxyClient::lockFullscreenOrientation):
(WebKit::WebFullScreenManagerProxyClient::unlockFullscreenOrientation):
* Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.cpp:
(WebKit::WebScreenOrientationManagerProxy::lock):
(WebKit::WebScreenOrientationManagerProxy::unlock):
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::toUIInterfaceOrientationMask):
(WebKit::PageClientImpl::lockFullscreenOrientation):
(WebKit::PageClientImpl::unlockFullscreenOrientation):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController initWithWebView:]):
(-[WKFullScreenViewController setSupportedOrientation:]):
(-[WKFullScreenViewController supportedInterfaceOrientations]):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController setSupportedOrientations:]):

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




More information about the webkit-changes mailing list