[webkit-changes] [WebKit/WebKit] b5f2ee: Adjust screensize of fullscreen video based on asp...

mwyrzykowski noreply at github.com
Thu Sep 15 13:23:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b5f2ee5f0c0d6ec20fc1ebe88e2c5b3eba32df72
      https://github.com/WebKit/WebKit/commit/b5f2ee5f0c0d6ec20fc1ebe88e2c5b3eba32df72
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.h
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.messages.in
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
    M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
    M Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp
    M Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h

  Log Message:
  -----------
  Adjust screensize of fullscreen video based on aspect ratio
https://bugs.webkit.org/show_bug.cgi?id=244733
<rdar://97617380>

Reviewed by Tim Horton.

Pass the video dimensions in the EnterFullScreen message so
the UI process can appropriately size the window to match the
video content.

* Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
Pass video dimensions.

* Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.messages.in:
Extend message with the video dimensions.

* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::enterFullScreen):
Pass video dimensions.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
Compute the aspect ratio so the window size matches the video which is playing.
(-[WKFullScreenWindowController videoDimensionsDidChange:]):
Move to helper so VideoFullscreenManagerProxy can call it.

* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::enterFullScreenForElement):
Update the main video element and retrieve the video size to pass to the
EnterFullScreen message.

* Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
(WebKit::InjectedBundlePageFullScreenClient::enterFullScreenForElement):
* Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
Pass video dimensions.

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




More information about the webkit-changes mailing list