Title: [112991] trunk/Source/WebKit/chromium
Revision
112991
Author
[email protected]
Date
2012-04-03 00:21:10 -0700 (Tue, 03 Apr 2012)

Log Message

WebViewImpl doesn't notify the page that the user has canceled fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=82760

Reviewed by Darin Fisher.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::willExitFullScreen):
(WebKit::WebViewImpl::exitFullScreenForElement):
* src/WebViewImpl.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (112990 => 112991)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-03 07:18:39 UTC (rev 112990)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-03 07:21:10 UTC (rev 112991)
@@ -1,3 +1,16 @@
+2012-04-03  Bill Budge  <[email protected]>
+
+        WebViewImpl doesn't notify the page that the user has canceled fullscreen.
+        https://bugs.webkit.org/show_bug.cgi?id=82760
+
+        Reviewed by Darin Fisher.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+        (WebKit::WebViewImpl::willExitFullScreen):
+        (WebKit::WebViewImpl::exitFullScreenForElement):
+        * src/WebViewImpl.h:
+
 2012-04-02  Kent Tamura  <[email protected]>
 
         [Chromium] Add WebKit API for WebCore::TextFieldDecorator

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (112990 => 112991)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-04-03 07:18:39 UTC (rev 112990)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-04-03 07:21:10 UTC (rev 112991)
@@ -369,6 +369,7 @@
     , m_isTransparent(false)
     , m_tabsToLinks(false)
     , m_dragScrollTimer(adoptPtr(new DragScrollTimer))
+    , m_isCancelingFullScreen(false)
 #if USE(ACCELERATED_COMPOSITING)
     , m_rootGraphicsLayer(0)
     , m_isAcceleratedCompositingActive(false)
@@ -1332,8 +1333,14 @@
         return;
 
     if (Document* doc = m_fullScreenFrame->document()) {
-        if (doc->webkitIsFullScreen())
+        if (doc->webkitIsFullScreen()) {
+            // When the client exits from full screen we have to call webkitCancelFullScreen to
+            // notify the document. While doing that, suppress notifications back to the client.
+            m_isCancelingFullScreen = true;
+            doc->webkitCancelFullScreen();
+            m_isCancelingFullScreen = false;
             doc->webkitWillExitFullScreenForElement(0);
+        }
     }
 #endif
 }
@@ -1568,6 +1575,9 @@
 
 void WebViewImpl::exitFullScreenForElement(WebCore::Element* element)
 {
+    // The client is exiting full screen, so don't send a notification.
+    if (m_isCancelingFullScreen)
+        return;
     if (m_client)
         m_client->exitFullScreen();
 }

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (112990 => 112991)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-04-03 07:18:39 UTC (rev 112990)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-04-03 07:21:10 UTC (rev 112991)
@@ -719,6 +719,7 @@
 
     // If set, the WebView is in fullscreen mode for an element in this frame.
     RefPtr<WebCore::Frame> m_fullScreenFrame;
+    bool m_isCancelingFullScreen;
 
 #if USE(ACCELERATED_COMPOSITING)
     WebCore::IntRect m_rootLayerScrollDamage;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to