Diff
Modified: branches/safari-534-branch/Source/WebCore/ChangeLog (87201 => 87202)
--- branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-24 21:06:39 UTC (rev 87202)
@@ -1,5 +1,21 @@
2011-05-24 Lucas Forschler <[email protected]>
+ Merged r86992.
+
+ 2011-05-20 Jeremy Noble <[email protected]>
+
+ Reviewed by Maciej Stachowiak.
+
+ WebKit2: Exit full screen mode if the WebProcess crashes.
+ https://bugs.webkit.org/show_bug.cgi?id=61151
+
+ * platform/graphics/win/FullScreenController.h:
+ * platform/graphics/win/FullScreenController.cpp:
+ (FullScreenController::close): Added. Close the full-screen window without animation
+ if called.
+
+2011-05-24 Lucas Forschler <[email protected]>
+
Merged r87022.
2011-05-21 Jeremy Noble <[email protected]>
Modified: branches/safari-534-branch/Source/WebCore/platform/graphics/win/FullScreenController.cpp (87201 => 87202)
--- branches/safari-534-branch/Source/WebCore/platform/graphics/win/FullScreenController.cpp 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebCore/platform/graphics/win/FullScreenController.cpp 2011-05-24 21:06:39 UTC (rev 87202)
@@ -193,4 +193,19 @@
exitFullScreenRepaintCompleted();
}
+void FullScreenController::close()
+{
+ if (!m_private->m_isFullScreen)
+ return;
+ m_private->m_isFullScreen = false;
+
+ m_private->m_client->fullScreenClientWillExitFullScreen();
+ m_private->m_client->fullScreenClientSetParentWindow(m_private->m_originalHost);
+ m_private->m_fullScreenWindow = nullptr;
+
+ m_private->m_client->fullScreenClientDidExitFullScreen();
+ ::SetWindowPos(m_private->m_client->fullScreenClientWindow(), 0, m_private->m_originalFrame.x(), m_private->m_originalFrame.y(), m_private->m_originalFrame.width(), m_private->m_originalFrame.height(), SWP_NOACTIVATE | SWP_NOZORDER);
+ ::RedrawWindow(m_private->m_client->fullScreenClientWindow(), 0, 0, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_ALLCHILDREN);
+ m_private->m_backgroundWindow = nullptr;
+}
#endif
Modified: branches/safari-534-branch/Source/WebCore/platform/graphics/win/FullScreenController.h (87201 => 87202)
--- branches/safari-534-branch/Source/WebCore/platform/graphics/win/FullScreenController.h 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebCore/platform/graphics/win/FullScreenController.h 2011-05-24 21:06:39 UTC (rev 87202)
@@ -46,6 +46,8 @@
bool isFullScreen() const;
+ void close();
+
protected:
void enterFullScreenRepaintCompleted();
void exitFullScreenRepaintCompleted();
Modified: branches/safari-534-branch/Source/WebKit2/ChangeLog (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/ChangeLog 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/ChangeLog 2011-05-24 21:06:39 UTC (rev 87202)
@@ -1,5 +1,31 @@
2011-05-24 Lucas Forschler <[email protected]>
+ Merged r86992.
+
+ 2011-05-20 Jeremy Noble <[email protected]>
+
+ Reviewed by Maciej Stachowiak.
+
+ WebKit2: Exit full screen mode if the WebProcess crashes.
+ https://bugs.webkit.org/show_bug.cgi?id=61151
+
+ If the WebProcess crashes, exit full-screen mode to avoid getting stuck. Move the
+ WebFullScreenManagerProxy::invalidate() implementation into the platform-specific
+ files, and have them close their respective platform's full-screen window.
+
+ * UIProcess/WebFullScreenManagerProxy.cpp:
+ * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
+ (WebKit::WebFullScreenManagerProxy::invalidate): Added. Copied from main implementation.
+ * UIProcess/mac/WKFullScreenWindowController.h:
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (-[WKFullScreenWindowController close]): Added.
+ * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
+ (WebKit::WebFullScreenManagerProxy::invalidate): Added.
+ * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
+ (WebKit::WebFullScreenManagerProxy::invalidate): Added.
+
+2011-05-24 Lucas Forschler <[email protected]>
+
Merged r87022.
2011-05-21 Jeremy Noble <[email protected]>
Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp 2011-05-24 21:06:39 UTC (rev 87202)
@@ -49,11 +49,6 @@
{
}
-void WebFullScreenManagerProxy::invalidate()
-{
- m_webView = 0;
-}
-
void WebFullScreenManagerProxy::setWebView(PlatformWebView* webView)
{
m_webView = webView;
Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp 2011-05-24 21:06:39 UTC (rev 87202)
@@ -31,6 +31,11 @@
namespace WebKit {
+void WebFullScreenManagerProxy::invalidate()
+{
+ m_webView = 0;
+}
+
void WebFullScreenManagerProxy::enterFullScreen()
{
notImplemented();
Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h 2011-05-24 21:06:39 UTC (rev 87202)
@@ -69,6 +69,7 @@
- (void)enterAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)context;
- (void)exitAcceleratedCompositingMode;
- (WebCore::IntRect)getFullScreenRect;
+- (void)close;
@end
Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2011-05-24 21:06:39 UTC (rev 87202)
@@ -417,6 +417,17 @@
return enclosingIntRect([[self window] frame]);
}
+- (void)close
+{
+ // We are being asked to close rapidly, most likely because the page
+ // has closed or the web process has crashed. Just walk through our
+ // normal exit full screen sequence, but don't wait to be called back
+ // in response.
+ [self exitFullScreen];
+ [self beganExitFullScreenAnimation];
+ [self finishedExitFullScreenAnimation:YES];
+}
+
#pragma mark -
#pragma mark Internal Interface
Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm 2011-05-24 21:06:39 UTC (rev 87202)
@@ -35,6 +35,15 @@
namespace WebKit {
+void WebFullScreenManagerProxy::invalidate()
+{
+ if (!m_webView)
+ return;
+
+ [[m_webView fullScreenWindowController] close];
+ m_webView = 0;
+}
+
void WebFullScreenManagerProxy::enterFullScreen()
{
if (!m_webView)
Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/win/WebFullScreenManagerProxyWin.cpp (87201 => 87202)
--- branches/safari-534-branch/Source/WebKit2/UIProcess/win/WebFullScreenManagerProxyWin.cpp 2011-05-24 21:01:47 UTC (rev 87201)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/win/WebFullScreenManagerProxyWin.cpp 2011-05-24 21:06:39 UTC (rev 87202)
@@ -34,6 +34,15 @@
namespace WebKit {
+void WebFullScreenManagerProxy::invalidate()
+{
+ if (!m_webView)
+ return;
+
+ m_webView->fullScreenController()->close();
+ m_webView = 0;
+}
+
void WebFullScreenManagerProxy::enterFullScreen()
{
if (!m_webView)