Title: [292195] trunk/Source/WebKit
Revision
292195
Author
[email protected]
Date
2022-03-31 19:13:46 -0700 (Thu, 31 Mar 2022)

Log Message

Player window shouldn't have black bar when going into fullscreen
https://bugs.webkit.org/show_bug.cgi?id=238592
rdar://91085981

Reviewed by Tim Horton.

Set the window size to the video element size when going fullscreen and
restore the original window size when coming out of it.

Manually tested.

* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (292194 => 292195)


--- trunk/Source/WebKit/ChangeLog	2022-04-01 01:52:14 UTC (rev 292194)
+++ trunk/Source/WebKit/ChangeLog	2022-04-01 02:13:46 UTC (rev 292195)
@@ -1,3 +1,20 @@
+2022-03-31  Jean-Yves Avenard  <[email protected]>
+
+        Player window shouldn't have black bar when going into fullscreen
+        https://bugs.webkit.org/show_bug.cgi?id=238592
+        rdar://91085981
+
+        Reviewed by Tim Horton.
+
+        Set the window size to the video element size when going fullscreen and
+        restore the original window size when coming out of it.
+
+        Manually tested.
+
+        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
+        (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
+        (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
+
 2022-03-31  Chris Dumez  <[email protected]>
 
         Adopt Identifier::fromString(ASCIILiteral) more broadly

Modified: trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm (292194 => 292195)


--- trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm	2022-04-01 01:52:14 UTC (rev 292194)
+++ trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm	2022-04-01 02:13:46 UTC (rev 292195)
@@ -461,6 +461,7 @@
 
     CGRect _initialFrame;
     CGRect _finalFrame;
+    CGRect _originalWindowFrame;
 
     RetainPtr<NSString> _EVOrganizationName;
     BOOL _EVOrganizationNameIsValid;
@@ -634,6 +635,7 @@
 
     _initialFrame = initialFrame;
     _finalFrame = finalFrame;
+    _originalWindowFrame = [[_fullscreenViewController view] frame];
     
     _initialFrame.size = WebKit::sizeExpandedToSize(_initialFrame.size, CGSizeMake(1, 1));
     _finalFrame.size = WebKit::sizeExpandedToSize(_finalFrame.size, CGSizeMake(1, 1));
@@ -671,8 +673,7 @@
             page->setSuppressVisibilityUpdates(false);
 
 #if HAVE(UIKIT_WEBKIT_INTERNALS)
-            auto* view = [_fullscreenViewController view];
-            configureViewForEnteringFullscreen(view, kAnimationDuration, [view frame].size);
+            configureViewForEnteringFullscreen(_fullscreenViewController.get().view, kAnimationDuration, _finalFrame.size);
 #endif
 
             if (auto* videoFullscreenManager = self._videoFullscreenManager) {
@@ -788,7 +789,7 @@
         [self _dismissFullscreenViewController];
     };
 #if HAVE(UIKIT_WEBKIT_INTERNALS)
-    configureViewForExitingFullscreen(_fullscreenViewController.get().view, kAnimationDuration, [[_fullscreenViewController view] frame].size, WTFMove(completionHandler));
+    configureViewForExitingFullscreen(_fullscreenViewController.get().view, kAnimationDuration, _originalWindowFrame.size, WTFMove(completionHandler));
 #else
     completionHandler();
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to