Changeset 245000 in webkit


Ignore:
Timestamp:
May 6, 2019 8:51:58 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Improve coordination for creating UIWindow instances.
https://bugs.webkit.org/show_bug.cgi?id=197578.
<rdar://problem/50456965>.

Patch by James Savage <James Savage> on 2019-05-06
Reviewed by Wenson Hsieh.

Source/WebCore:

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(makeWindowFromView): Pull out window creation.
(VideoFullscreenInterfaceAVKit::doSetup): Call new helper function.

Source/WebKit:

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(makeWindowFromView): Pull out window creation.
(-[WKFullScreenWindowController enterFullScreen]): Call new helper function.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244998 r245000  
     12019-05-06  James Savage  <james.savage@apple.com>
     2
     3        Improve coordination for creating UIWindow instances.
     4        https://bugs.webkit.org/show_bug.cgi?id=197578.
     5        <rdar://problem/50456965>.
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
     10        (makeWindowFromView): Pull out window creation.
     11        (VideoFullscreenInterfaceAVKit::doSetup): Call new helper function.
     12
    1132019-05-06  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm

    r244704 r245000  
    11751175}
    11761176
     1177#if USE(APPLE_INTERNAL_SDK)
     1178#import <WebKitAdditions/VideoFullscreenInterfaceAVKitAdditions.mm>
     1179#else
     1180static RetainPtr<UIWindow> makeWindowFromView(UIView *)
     1181{
     1182    return adoptNS([PAL::allocUIWindowInstance() initWithFrame:[[PAL::getUIScreenClass() mainScreen] bounds]]);
     1183}
     1184#endif
     1185
    11771186void VideoFullscreenInterfaceAVKit::doSetup()
    11781187{
     
    11971206#if !PLATFORM(WATCHOS)
    11981207    if (![[m_parentView window] _isHostedInAnotherProcess] && !m_window) {
    1199         if (!m_window)
    1200             m_window = adoptNS([PAL::allocUIWindowInstance() initWithFrame:[[PAL::getUIScreenClass() mainScreen] bounds]]);
     1208        m_window = makeWindowFromView(m_parentView.get());
    12011209        [m_window setBackgroundColor:clearUIColor()];
    12021210        if (!m_viewController)
  • trunk/Source/WebKit/ChangeLog

    r244998 r245000  
     12019-05-06  James Savage  <james.savage@apple.com>
     2
     3        Improve coordination for creating UIWindow instances.
     4        https://bugs.webkit.org/show_bug.cgi?id=197578.
     5        <rdar://problem/50456965>.
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
     10        (makeWindowFromView): Pull out window creation.
     11        (-[WKFullScreenWindowController enterFullScreen]): Call new helper function.
     12
    1132019-05-06  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

    r244955 r245000  
    490490#pragma mark External Interface
    491491
     492#if USE(APPLE_INTERNAL_SDK)
     493#import <WebKitAdditions/WKFullScreenWindowControllerIOSAdditions.mm>
     494#else
     495static RetainPtr<UIWindow> makeWindowFromView(UIView *)
     496{
     497    return adoptNS([[UIWindow alloc] init]);
     498}
     499#endif
     500
    492501- (void)enterFullScreen
    493502{
     
    505514    _fullScreenState = WebKit::WaitingToEnterFullScreen;
    506515
    507     _window = adoptNS([[UIWindow alloc] init]);
     516    _window = makeWindowFromView(webView.get());
    508517    [_window setBackgroundColor:[UIColor clearColor]];
    509518    [_window setWindowLevel:UIWindowLevelNormal - 1];
Note: See TracChangeset for help on using the changeset viewer.