Title: [193760] trunk/Source/WebCore
- Revision
- 193760
- Author
- jer.no...@apple.com
- Date
- 2015-12-08 11:11:03 -0800 (Tue, 08 Dec 2015)
Log Message
[iOS] Adopt WebFullScreenVideoRootViewController.
https://bugs.webkit.org/show_bug.cgi?id=151996
Reviewed by Dan Bernstein.
Adopt WebFullScreenVideoRootViewController from WebKitAdditions. If it is not available, create and use
a generic UIViewController subclass.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(createFullScreenVideoRootViewControllerClass):
(allocWebFullScreenVideoRootViewControllerInstance):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (193759 => 193760)
--- trunk/Source/WebCore/ChangeLog 2015-12-08 18:53:51 UTC (rev 193759)
+++ trunk/Source/WebCore/ChangeLog 2015-12-08 19:11:03 UTC (rev 193760)
@@ -1,3 +1,18 @@
+2015-12-08 Jer Noble <jer.no...@apple.com>
+
+ [iOS] Adopt WebFullScreenVideoRootViewController.
+ https://bugs.webkit.org/show_bug.cgi?id=151996
+
+ Reviewed by Dan Bernstein.
+
+ Adopt WebFullScreenVideoRootViewController from WebKitAdditions. If it is not available, create and use
+ a generic UIViewController subclass.
+
+ * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+ (createFullScreenVideoRootViewControllerClass):
+ (allocWebFullScreenVideoRootViewControllerInstance):
+ (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
+
2015-12-08 Andy Estes <aes...@apple.com>
ImmutableNFANodeBuilder's move constructor moves an uninitialized member variable into itself
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (193759 => 193760)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2015-12-08 18:53:51 UTC (rev 193759)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2015-12-08 19:11:03 UTC (rev 193760)
@@ -80,6 +80,32 @@
}
#endif
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/WebFullScreenVideoRootViewController.m>
+#else
+@interface WebFullScreenVideoRootViewController : UIViewController
+- (instancetype)initWithSourceWindow:(UIWindow *)sourceWindow;
+@end
+
+static Class createFullScreenVideoRootViewControllerClass()
+{
+ Class newClass = objc_allocateClassPair(getUIViewControllerClass(), "WebFullScreenVideoRootViewController", 0);
+
+ class_addMethod(newClass, @selector(initWithSourceWindow:), imp_implementationWithBlock(^(id self, UIWindow*){
+ return [self init];
+ }), "@@:@");
+
+ objc_registerClassPair(newClass);
+ return newClass;
+}
+
+static WebFullScreenVideoRootViewController *allocWebFullScreenVideoRootViewControllerInstance()
+{
+ static Class fullScreenVideoRootViewControllerClass = createFullScreenVideoRootViewControllerClass();
+ return [fullScreenVideoRootViewControllerClass alloc];
+}
+#endif
+
static const double DefaultWatchdogTimerInterval = 1;
@class WebAVMediaSelectionOption;
@@ -1084,7 +1110,7 @@
m_window = adoptNS([allocUIWindowInstance() initWithFrame:[[getUIScreenClass() mainScreen] bounds]]);
[m_window setBackgroundColor:[getUIColorClass() clearColor]];
if (!m_viewController)
- m_viewController = adoptNS([allocUIViewControllerInstance() init]);
+ m_viewController = adoptNS([allocWebFullScreenVideoRootViewControllerInstance() initWithSourceWindow:[parentView window]]);
[[m_viewController view] setFrame:[m_window bounds]];
[m_viewController _setIgnoreAppSupportedOrientations:YES];
[m_window setRootViewController:m_viewController.get()];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes