Title: [219520] trunk/Source/WebCore
Revision
219520
Author
commit-qu...@webkit.org
Date
2017-07-14 13:17:18 -0700 (Fri, 14 Jul 2017)

Log Message

Fix style for name of class alloc function in WebVideoFullscreenInterfaceAVKit.
https://bugs.webkit.org/show_bug.cgi?id=174476

Patch by Jeremy Jones <jere...@apple.com> on 2017-07-14
Reviewed by Alex Christensen.

No new tests because no behavior change.

This is a rename for per style requirements.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(allocWebAVPictureInPicturePlayerLayerViewInstance):
(WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
(allocWebAVPlayerLayerViewInstance):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(getWebAVPictureInPicturePlayerLayerViewClass): Deleted.
(getWebAVPlayerLayerViewClass): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (219519 => 219520)


--- trunk/Source/WebCore/ChangeLog	2017-07-14 20:08:05 UTC (rev 219519)
+++ trunk/Source/WebCore/ChangeLog	2017-07-14 20:17:18 UTC (rev 219520)
@@ -1,3 +1,22 @@
+2017-07-14  Jeremy Jones  <jere...@apple.com>
+
+        Fix style for name of class alloc function in WebVideoFullscreenInterfaceAVKit.
+        https://bugs.webkit.org/show_bug.cgi?id=174476
+
+        Reviewed by Alex Christensen.
+
+        No new tests because no behavior change.
+
+        This is a rename for per style requirements.
+
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (allocWebAVPictureInPicturePlayerLayerViewInstance):
+        (WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
+        (allocWebAVPlayerLayerViewInstance):
+        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
+        (getWebAVPictureInPicturePlayerLayerViewClass): Deleted.
+        (getWebAVPlayerLayerViewClass): Deleted.
+
 2017-07-14  Jer Noble  <jer.no...@apple.com>
 
         [MSE] Removing samples when presentation order does not match decode order can cause bad behavior.

Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (219519 => 219520)


--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm	2017-07-14 20:08:05 UTC (rev 219519)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm	2017-07-14 20:17:18 UTC (rev 219520)
@@ -42,7 +42,6 @@
 #import "WebPlaybackSessionInterfaceAVKit.h"
 #import "WebVideoFullscreenChangeObserver.h"
 #import "WebVideoFullscreenModel.h"
-#import <AVFoundation/AVTime.h>
 #import <UIKit/UIKit.h>
 #import <objc/message.h>
 #import <objc/runtime.h>
@@ -361,7 +360,7 @@
     return [WebAVPlayerLayer class];
 }
 
-static Class getWebAVPictureInPicturePlayerLayerViewClass()
+static WebAVPictureInPicturePlayerLayerView *allocWebAVPictureInPicturePlayerLayerViewInstance()
 {
     static Class theClass = nil;
     static dispatch_once_t onceToken;
@@ -372,7 +371,7 @@
         class_addMethod(metaClass, @selector(layerClass), (IMP)WebAVPictureInPicturePlayerLayerView_layerClass, "@@:");
     });
     
-    return theClass;
+    return (WebAVPictureInPicturePlayerLayerView *)[theClass alloc];
 }
 
 @interface WebAVPlayerLayerView : __AVPlayerLayerView
@@ -449,7 +448,7 @@
     WebAVPlayerLayerView *playerLayerView = aSelf;
     WebAVPictureInPicturePlayerLayerView *pipView = [playerLayerView valueForKey:@"_pictureInPicturePlayerLayerView"];
     if (!pipView) {
-        pipView = [[getWebAVPictureInPicturePlayerLayerViewClass() alloc] initWithFrame:CGRectZero];
+        pipView = [allocWebAVPictureInPicturePlayerLayerViewInstance() initWithFrame:CGRectZero];
         [playerLayerView setValue:pipView forKey:@"_pictureInPicturePlayerLayerView"];
     }
     return pipView;
@@ -467,7 +466,7 @@
 
 #pragma mark - Methods
 
-static Class getWebAVPlayerLayerViewClass()
+static WebAVPlayerLayerView *allocWebAVPlayerLayerViewInstance()
 {
     static Class theClass = nil;
     static dispatch_once_t onceToken;
@@ -488,7 +487,7 @@
         Class metaClass = objc_getMetaClass("WebAVPlayerLayerView");
         class_addMethod(metaClass, @selector(layerClass), (IMP)WebAVPlayerLayerView_layerClass, "@@:");
     });
-    return theClass;
+    return (WebAVPlayerLayerView *)[theClass alloc];
 }
 
 Ref<WebVideoFullscreenInterfaceAVKit> WebVideoFullscreenInterfaceAVKit::create(WebPlaybackSessionInterfaceAVKit& playbackSessionInterface)
@@ -618,7 +617,7 @@
     }
 
     if (!m_playerLayerView)
-        m_playerLayerView = adoptNS([[getWebAVPlayerLayerViewClass() alloc] init]);
+        m_playerLayerView = adoptNS([allocWebAVPlayerLayerViewInstance() init]);
     [m_playerLayerView setHidden:[playerController() isExternalPlaybackActive]];
     [m_playerLayerView setBackgroundColor:clearUIColor()];
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to