Index: Source/WebKit/chromium/src/WebViewImpl.cpp |
=================================================================== |
--- Source/WebKit/chromium/src/WebViewImpl.cpp (revision 113058) |
+++ Source/WebKit/chromium/src/WebViewImpl.cpp (working copy) |
@@ -354,6 +354,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) |
@@ -1313,8 +1314,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 |
} |
@@ -1549,6 +1556,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(); |
} |