Changeset 198783 in webkit


Ignore:
Timestamp:
Mar 29, 2016 9:49:07 AM (8 years ago)
Author:
mitz@apple.com
Message:

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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r198782 r198783  
     12016-03-29  Dan Bernstein  <mitz@apple.com>
     2
     3        Inline WebFullScreenVideoRootViewController.m
     4        https://bugs.webkit.org/show_bug.cgi?id=155971
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
     9        (createFullScreenVideoRootViewControllerClass): Replaced with the code from
     10          WebFullScreenVideoRootViewController.m.
     11
    1122016-03-29  Said Abou-Hallawa  <sabouhallawa@apple,com>
    213
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

    r197628 r198783  
    8282#endif
    8383
    84 #if USE(APPLE_INTERNAL_SDK)
    85 #import <WebKitAdditions/WebFullScreenVideoRootViewController.m>
    86 #else
    8784@interface WebFullScreenVideoRootViewController : UIViewController
    8885- (instancetype)initWithSourceWindow:(UIWindow *)sourceWindow;
     
    9390    Class newClass = objc_allocateClassPair(getUIViewControllerClass(), "WebFullScreenVideoRootViewController", 0);
    9491
    95     class_addMethod(newClass, @selector(initWithSourceWindow:), imp_implementationWithBlock(^(id self, UIWindow*){
    96         return [self init];
     92    class_addIvar(newClass, "_sourceWindow", sizeof(UIWindow *), log2(alignof(UIWindow *)), @encode(UIWindow *));
     93    Ivar sourceWindowIvar = class_getInstanceVariable(newClass, "_sourceWindow");
     94
     95    class_addMethod(newClass, @selector(initWithSourceWindow:), imp_implementationWithBlock(^(id self, UIWindow *sourceWindow){
     96        self = [self init];
     97        object_setIvar(self, sourceWindowIvar, [sourceWindow retain]);
     98        return self;
    9799    }), "@@:@");
     100
     101    class_addMethod(newClass, @selector(dealloc), imp_implementationWithBlock(^(id self){
     102        [object_getIvar(self, sourceWindowIvar) release];
     103        objc_super superClass { self, getUIViewControllerClass() };
     104        ((void (*)(objc_super*, SEL))objc_msgSendSuper)(&superClass, @selector(dealloc));
     105    }), "v@:");
     106
     107#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
     108    class_addMethod(newClass, @selector(childViewControllerForWhitePointAdaptivityStyle), imp_implementationWithBlock(^(id self){
     109        UIWindow *sourceWindow = object_getIvar(self, sourceWindowIvar);
     110        return sourceWindow.rootViewController;
     111    }), "@@:");
     112#endif
    98113
    99114    objc_registerClassPair(newClass);
     
    106121    return [fullScreenVideoRootViewControllerClass alloc];
    107122}
    108 #endif
    109123
    110124static const double DefaultWatchdogTimerInterval = 1;
Note: See TracChangeset for help on using the changeset viewer.