Title: [164873] trunk/Source/WebCore
Revision
164873
Author
jer.no...@apple.com
Date
2014-02-28 10:59:00 -0800 (Fri, 28 Feb 2014)

Log Message

[Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
https://bugs.webkit.org/show_bug.cgi?id=129491

Reviewed by Alexey Proskuryakov.

-[NSWindow contentView] returns a bare id, leading to ambiguity when calling
certain methods, including -layer and -setLayer:. Resolve the ambiguity by
explicitly casting the -contentView call to a NSView*.

* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (164872 => 164873)


--- trunk/Source/WebCore/ChangeLog	2014-02-28 18:58:07 UTC (rev 164872)
+++ trunk/Source/WebCore/ChangeLog	2014-02-28 18:59:00 UTC (rev 164873)
@@ -1,3 +1,19 @@
+2014-02-28  Jer Noble  <jer.no...@apple.com>
+
+        [Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
+        https://bugs.webkit.org/show_bug.cgi?id=129491
+
+        Reviewed by Alexey Proskuryakov.
+
+        -[NSWindow contentView] returns a bare id, leading to ambiguity when calling
+        certain methods, including -layer and -setLayer:. Resolve the ambiguity by
+        explicitly casting the -contentView call to a NSView*.
+
+        * platform/mac/WebVideoFullscreenController.mm:
+        (-[WebVideoFullscreenController setupVideoOverlay:]):
+        (-[WebVideoFullscreenController windowDidLoad]):
+        (-[WebVideoFullscreenController windowDidExitFullscreen]):
+
 2014-02-28  Andreas Kling  <akl...@apple.com>
 
         MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.

Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm (164872 => 164873)


--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm	2014-02-28 18:58:07 UTC (rev 164872)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm	2014-02-28 18:59:00 UTC (rev 164873)
@@ -98,7 +98,7 @@
 - (void)setupVideoOverlay:(CALayer *)layer
 {
     WebVideoFullscreenWindow *window = [self fullscreenWindow];
-    [[window contentView] setLayer:layer];
+    [(NSView*)[window contentView] setLayer:layer];
     [[window contentView] setWantsLayer:YES];
 }
 
@@ -107,7 +107,7 @@
     WebVideoFullscreenWindow *window = [self fullscreenWindow];
     [window setHasShadow:YES]; // This is nicer with a shadow.
     [window setLevel:NSPopUpMenuWindowLevel-1];
-    [[window contentView] setLayer:[CALayer layer]];
+    [(NSView*)[window contentView] setLayer:[CALayer layer]];
     [[window contentView] setWantsLayer:YES];
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidResignActive:) name:NSApplicationDidResignActiveNotification object:NSApp];
@@ -171,7 +171,7 @@
 
 - (void)windowDidExitFullscreen
 {
-    CALayer *layer = [[[self window] contentView] layer];
+    CALayer *layer = [(NSView*)[[self window] contentView] layer];
     if ([layer isKindOfClass:getAVPlayerLayerClass()])
         [[(AVPlayerLayer*)layer player] removeObserver:self forKeyPath:@"rate"];
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to