Title: [245000] trunk/Source
- Revision
- 245000
- Author
- commit-qu...@webkit.org
- Date
- 2019-05-06 20:51:58 -0700 (Mon, 06 May 2019)
Log Message
Improve coordination for creating UIWindow instances.
https://bugs.webkit.org/show_bug.cgi?id=197578.
<rdar://problem/50456965>.
Patch by James Savage <james.sav...@apple.com> 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244999 => 245000)
--- trunk/Source/WebCore/ChangeLog 2019-05-07 01:23:39 UTC (rev 244999)
+++ trunk/Source/WebCore/ChangeLog 2019-05-07 03:51:58 UTC (rev 245000)
@@ -1,3 +1,15 @@
+2019-05-06 James Savage <james.sav...@apple.com>
+
+ Improve coordination for creating UIWindow instances.
+ https://bugs.webkit.org/show_bug.cgi?id=197578.
+ <rdar://problem/50456965>.
+
+ Reviewed by Wenson Hsieh.
+
+ * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+ (makeWindowFromView): Pull out window creation.
+ (VideoFullscreenInterfaceAVKit::doSetup): Call new helper function.
+
2019-05-06 Tim Horton <timothy_hor...@apple.com>
_overrideViewportWithArguments does not work when called before loading
Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (244999 => 245000)
--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2019-05-07 01:23:39 UTC (rev 244999)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2019-05-07 03:51:58 UTC (rev 245000)
@@ -1174,6 +1174,15 @@
doExitFullscreen();
}
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/VideoFullscreenInterfaceAVKitAdditions.mm>
+#else
+static RetainPtr<UIWindow> makeWindowFromView(UIView *)
+{
+ return adoptNS([PAL::allocUIWindowInstance() initWithFrame:[[PAL::getUIScreenClass() mainScreen] bounds]]);
+}
+#endif
+
void VideoFullscreenInterfaceAVKit::doSetup()
{
Mode changes { m_currentMode.mode() ^ m_targetMode.mode() };
@@ -1196,8 +1205,7 @@
#if !PLATFORM(WATCHOS)
if (![[m_parentView window] _isHostedInAnotherProcess] && !m_window) {
- if (!m_window)
- m_window = adoptNS([PAL::allocUIWindowInstance() initWithFrame:[[PAL::getUIScreenClass() mainScreen] bounds]]);
+ m_window = makeWindowFromView(m_parentView.get());
[m_window setBackgroundColor:clearUIColor()];
if (!m_viewController)
m_viewController = adoptNS([PAL::allocUIViewControllerInstance() init]);
Modified: trunk/Source/WebKit/ChangeLog (244999 => 245000)
--- trunk/Source/WebKit/ChangeLog 2019-05-07 01:23:39 UTC (rev 244999)
+++ trunk/Source/WebKit/ChangeLog 2019-05-07 03:51:58 UTC (rev 245000)
@@ -1,3 +1,15 @@
+2019-05-06 James Savage <james.sav...@apple.com>
+
+ Improve coordination for creating UIWindow instances.
+ https://bugs.webkit.org/show_bug.cgi?id=197578.
+ <rdar://problem/50456965>.
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
+ (makeWindowFromView): Pull out window creation.
+ (-[WKFullScreenWindowController enterFullScreen]): Call new helper function.
+
2019-05-06 Tim Horton <timothy_hor...@apple.com>
_overrideViewportWithArguments does not work when called before loading
Modified: trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm (244999 => 245000)
--- trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm 2019-05-07 01:23:39 UTC (rev 244999)
+++ trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm 2019-05-07 03:51:58 UTC (rev 245000)
@@ -489,6 +489,15 @@
#pragma mark -
#pragma mark External Interface
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/WKFullScreenWindowControllerIOSAdditions.mm>
+#else
+static RetainPtr<UIWindow> makeWindowFromView(UIView *)
+{
+ return adoptNS([[UIWindow alloc] init]);
+}
+#endif
+
- (void)enterFullScreen
{
if ([self isFullScreen])
@@ -504,7 +513,7 @@
_fullScreenState = WebKit::WaitingToEnterFullScreen;
- _window = adoptNS([[UIWindow alloc] init]);
+ _window = makeWindowFromView(webView.get());
[_window setBackgroundColor:[UIColor clearColor]];
[_window setWindowLevel:UIWindowLevelNormal - 1];
[_window setHidden:NO];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes