Modified: trunk/Source/WebCore/ChangeLog (198782 => 198783)
--- trunk/Source/WebCore/ChangeLog 2016-03-29 16:18:25 UTC (rev 198782)
+++ trunk/Source/WebCore/ChangeLog 2016-03-29 16:49:07 UTC (rev 198783)
@@ -1,3 +1,14 @@
+2016-03-29 Dan Bernstein <m...@apple.com>
+
+ Inline WebFullScreenVideoRootViewController.m
+ https://bugs.webkit.org/show_bug.cgi?id=155971
+
+ Reviewed by Anders Carlsson.
+
+ * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+ (createFullScreenVideoRootViewControllerClass): Replaced with the code from
+ WebFullScreenVideoRootViewController.m.
+
2016-03-29 Said Abou-Hallawa <sabouhallawa@apple,com>
Create a CG ImageDecoder class instead of defining it as CGImageSourceRef
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (198782 => 198783)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-03-29 16:18:25 UTC (rev 198782)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2016-03-29 16:49:07 UTC (rev 198783)
@@ -81,9 +81,6 @@
}
#endif
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WebFullScreenVideoRootViewController.m>
-#else
@interface WebFullScreenVideoRootViewController : UIViewController
- (instancetype)initWithSourceWindow:(UIWindow *)sourceWindow;
@end
@@ -92,10 +89,28 @@
{
Class newClass = objc_allocateClassPair(getUIViewControllerClass(), "WebFullScreenVideoRootViewController", 0);
- class_addMethod(newClass, @selector(initWithSourceWindow:), imp_implementationWithBlock(^(id self, UIWindow*){
- return [self init];
+ class_addIvar(newClass, "_sourceWindow", sizeof(UIWindow *), log2(alignof(UIWindow *)), @encode(UIWindow *));
+ Ivar sourceWindowIvar = class_getInstanceVariable(newClass, "_sourceWindow");
+
+ class_addMethod(newClass, @selector(initWithSourceWindow:), imp_implementationWithBlock(^(id self, UIWindow *sourceWindow){
+ self = [self init];
+ object_setIvar(self, sourceWindowIvar, [sourceWindow retain]);
+ return self;
}), "@@:@");
+ class_addMethod(newClass, @selector(dealloc), imp_implementationWithBlock(^(id self){
+ [object_getIvar(self, sourceWindowIvar) release];
+ objc_super superClass { self, getUIViewControllerClass() };
+ ((void (*)(objc_super*, SEL))objc_msgSendSuper)(&superClass, @selector(dealloc));
+ }), "v@:");
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
+ class_addMethod(newClass, @selector(childViewControllerForWhitePointAdaptivityStyle), imp_implementationWithBlock(^(id self){
+ UIWindow *sourceWindow = object_getIvar(self, sourceWindowIvar);
+ return sourceWindow.rootViewController;
+ }), "@@:");
+#endif
+
objc_registerClassPair(newClass);
return newClass;
}
@@ -105,7 +120,6 @@
static Class fullScreenVideoRootViewControllerClass = createFullScreenVideoRootViewControllerClass();
return [fullScreenVideoRootViewControllerClass alloc];
}
-#endif
static const double DefaultWatchdogTimerInterval = 1;