Skip to content

Commit

Permalink
Media: Update fullscreen controls for 1360 PPM
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259845
rdar://112866983

Reviewed by Eric Carlson.

The visionOS media controls are too small when in
fullscreen.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController enterFullScreen:]):

Canonical link: https://commits.webkit.org/266607@main
  • Loading branch information
grorg committed Aug 5, 2023
1 parent 890f599 commit 17723aa
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
using namespace WebKit;
using namespace WebCore;

static constexpr float ZoomForFullscreenWindow = 1.0;
#if PLATFORM(VISION)
static constexpr float ZoomForVisionFullscreenVideoWindow = 1.36;
#endif

static CGSize sizeExpandedToSize(CGSize initial, CGSize other)
{
return CGSizeMake(std::max(initial.width, other.width), std::max(initial.height, other.height));
Expand Down Expand Up @@ -898,10 +903,18 @@ - (void)enterFullScreen:(CGSize)videoDimensions
manager->setAnimatingFullScreen(true);

WebCore::ViewportArguments arguments { WebCore::ViewportArguments::CSSDeviceAdaptation };
arguments.zoom = 1;
arguments.minZoom = 1;
arguments.maxZoom = 1;
arguments.userZoom = 1;
arguments.zoom = WebKit::ZoomForFullscreenWindow;
arguments.minZoom = WebKit::ZoomForFullscreenWindow;
arguments.maxZoom = WebKit::ZoomForFullscreenWindow;
arguments.userZoom = WebKit::ZoomForFullscreenWindow;
#if PLATFORM(VISION)
if (manager->isVideoElement()) {
arguments.zoom = WebKit::ZoomForVisionFullscreenVideoWindow;
arguments.minZoom = WebKit::ZoomForVisionFullscreenVideoWindow;
arguments.maxZoom = WebKit::ZoomForVisionFullscreenVideoWindow;
arguments.userZoom = WebKit::ZoomForVisionFullscreenVideoWindow;
}
#endif
page->setOverrideViewportArguments(arguments);

page->forceRepaint([protectedSelf = retainPtr(self), self, logIdentifier = logIdentifier] {
Expand Down

0 comments on commit 17723aa

Please sign in to comment.