Title: [113501] trunk/Source/WebKit2
Revision
113501
Author
jer.no...@apple.com
Date
2012-04-06 14:49:11 -0700 (Fri, 06 Apr 2012)

Log Message

WebFullScreenManagerProxy::isFullScreen() will create an empty full screen window; steal focus.
https://bugs.webkit.org/show_bug.cgi?id=83388

Reviewed by Geoffrey Garen.

Calling WebFullScreenManagerProxy::isFullScreen() will create a WKFullScreenWindowController if
one does not already exist, since the -[WKView fullScreenWindowController] method will create-on-access.
Add a new call, -[WKView hasFullScreenWindowController], which does not auto-create the controller
and add that check to WebFullScreenManagerProxy::isFullScreen().

* UIProcess/API/mac/WKView.mm:
(-[WKView hasFullScreenWindowController]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
(WebKit::WebFullScreenManagerProxy::isFullScreen):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (113500 => 113501)


--- trunk/Source/WebKit2/ChangeLog	2012-04-06 21:48:33 UTC (rev 113500)
+++ trunk/Source/WebKit2/ChangeLog	2012-04-06 21:49:11 UTC (rev 113501)
@@ -1,3 +1,21 @@
+2012-04-06  Jer Noble  <jer.no...@apple.com>
+
+        WebFullScreenManagerProxy::isFullScreen() will create an empty full screen window; steal focus.
+        https://bugs.webkit.org/show_bug.cgi?id=83388
+
+        Reviewed by Geoffrey Garen.
+
+        Calling WebFullScreenManagerProxy::isFullScreen() will create a WKFullScreenWindowController if 
+        one does not already exist, since the -[WKView fullScreenWindowController] method will create-on-access.
+        Add a new call, -[WKView hasFullScreenWindowController], which does not auto-create the controller
+        and add that check to WebFullScreenManagerProxy::isFullScreen().
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView hasFullScreenWindowController]):
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
+        (WebKit::WebFullScreenManagerProxy::isFullScreen):
+
 2012-04-06  Tim Horton  <timothy_hor...@apple.com>
 
         Add autodetection of image orientation from EXIF information

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (113500 => 113501)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2012-04-06 21:48:33 UTC (rev 113500)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2012-04-06 21:49:11 UTC (rev 113501)
@@ -2799,6 +2799,11 @@
 }
 
 #if ENABLE(FULLSCREEN_API)
+- (BOOL)hasFullScreenWindowController
+{
+    return (bool)_data->_fullScreenWindowController;
+}
+
 - (WKFullScreenWindowController*)fullScreenWindowController
 {
     if (!_data->_fullScreenWindowController) {

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (113500 => 113501)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h	2012-04-06 21:48:33 UTC (rev 113500)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h	2012-04-06 21:49:11 UTC (rev 113501)
@@ -88,6 +88,7 @@
 - (void)_didChangeScrollbarsForMainFrame;
 
 #if ENABLE(FULLSCREEN_API)
+- (BOOL)hasFullScreenWindowController;
 - (WKFullScreenWindowController*)fullScreenWindowController;
 - (void)closeFullScreenWindowController;
 #endif

Modified: trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm (113500 => 113501)


--- trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm	2012-04-06 21:48:33 UTC (rev 113500)
+++ trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm	2012-04-06 21:49:11 UTC (rev 113501)
@@ -57,6 +57,9 @@
 {
     if (!m_webView)
         return false;
+    if (![m_webView hasFullScreenWindowController])
+        return false;
+
     return [[m_webView fullScreenWindowController] isFullScreen];
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to