HiDPI: Switching a video element to full screen in HiDPI mode doesn't fit the screen...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Dec 2011 21:23:16 +0000 (21:23 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Dec 2011 21:23:16 +0000 (21:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74119
rdar://problem/10356869

Reviewed by Darin Adler.

Use the Lion-only -[NSWindow convertRectToScreen:] function to convert between window
coordinates and screen coordinates.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102377 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

index af58ec0..b03a779 100644 (file)
@@ -1,3 +1,17 @@
+2011-12-08  Jer Noble  <jer.noble@apple.com>
+
+        HiDPI: Switching a video element to full screen in HiDPI mode doesn't fit the screen correctly
+        https://bugs.webkit.org/show_bug.cgi?id=74119
+        rdar://problem/10356869
+
+        Reviewed by Darin Adler.
+
+        Use the Lion-only -[NSWindow convertRectToScreen:] function to convert between window 
+        coordinates and screen coordinates.
+
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+        (-[WKFullScreenWindowController enterFullScreen:]):
+
 2011-12-08  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         [Qt][WK2] Unreviewed buildfix after r102352.
index c15ae44..204439f 100644 (file)
@@ -188,8 +188,13 @@ static void continueExitCompositingModeAfterRepaintCallback(WKErrorRef error, vo
         screen = [NSScreen mainScreen];
     NSRect screenFrame = [screen frame];
     
+#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
     NSRect webViewFrame = [_webView convertRectToBase:[_webView frame]];
     webViewFrame.origin = [[_webView window] convertBaseToScreen:webViewFrame.origin];
+#else
+    NSRect webViewFrame = [[_webView window] convertRectToScreen:
+        [_webView convertRect:[_webView frame] toView:nil]];
+#endif
         
     // In the case of a multi-monitor setup where the webView straddles two
     // monitors, we must create a window large enough to contain the destination