⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 292195 in webkit


Ignore:
Timestamp:
Mar 31, 2022, 7:13:46 PM (5 years ago)
Author:
Jean-Yves Avenard
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:]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r292193 r292195  
     12022-03-31  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Player window shouldn't have black bar when going into fullscreen
     4        https://bugs.webkit.org/show_bug.cgi?id=238592
     5        rdar://91085981
     6
     7        Reviewed by Tim Horton.
     8
     9        Set the window size to the video element size when going fullscreen and
     10        restore the original window size when coming out of it.
     11
     12        Manually tested.
     13
     14        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
     15        (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
     16        (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
     17
    1182022-03-31  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

    r292097 r292195  
    462462    CGRect _initialFrame;
    463463    CGRect _finalFrame;
     464    CGRect _originalWindowFrame;
    464465
    465466    RetainPtr<NSString> _EVOrganizationName;
    … …  
    635636    _initialFrame = initialFrame;
    636637    _finalFrame = finalFrame;
     638    _originalWindowFrame = [[_fullscreenViewController view] frame];
    637639   
    638640    _initialFrame.size = WebKit::sizeExpandedToSize(_initialFrame.size, CGSizeMake(1, 1));
    … …  
    672674
    673675#if HAVE(UIKIT_WEBKIT_INTERNALS)
    674             auto* view = [_fullscreenViewController view];
    675             configureViewForEnteringFullscreen(view, kAnimationDuration, [view frame].size);
     676            configureViewForEnteringFullscreen(_fullscreenViewController.get().view, kAnimationDuration, _finalFrame.size);
    676677#endif
    677678
    … …  
    789790    };
    790791#if HAVE(UIKIT_WEBKIT_INTERNALS)
    791     configureViewForExitingFullscreen(_fullscreenViewController.get().view, kAnimationDuration, [[_fullscreenViewController view] frame].size, WTFMove(completionHandler));
     792    configureViewForExitingFullscreen(_fullscreenViewController.get().view, kAnimationDuration, _originalWindowFrame.size, WTFMove(completionHandler));
    792793#else
    793794    completionHandler();
Note: See TracChangeset for help on using the changeset viewer.