- Revision
- 86992
- Author
- jer.no...@apple.com
- Date
- 2011-05-20 15:36:21 -0700 (Fri, 20 May 2011)
Log Message
2011-05-20 Jeremy Noble <jer.no...@apple.com>
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-20 Jeremy Noble <jer.no...@apple.com>
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (86991 => 86992)
--- trunk/Source/WebCore/ChangeLog 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebCore/ChangeLog 2011-05-20 22:36:21 UTC (rev 86992)
@@ -1,3 +1,15 @@
+2011-05-20 Jeremy Noble <jer.no...@apple.com>
+
+ 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-20 Enrica Casucci <enr...@apple.com>
Reviewed by David Kilzer.
Modified: trunk/Source/WebCore/platform/graphics/win/FullScreenController.cpp (86991 => 86992)
--- trunk/Source/WebCore/platform/graphics/win/FullScreenController.cpp 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebCore/platform/graphics/win/FullScreenController.cpp 2011-05-20 22:36:21 UTC (rev 86992)
@@ -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: trunk/Source/WebCore/platform/graphics/win/FullScreenController.h (86991 => 86992)
--- trunk/Source/WebCore/platform/graphics/win/FullScreenController.h 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebCore/platform/graphics/win/FullScreenController.h 2011-05-20 22:36:21 UTC (rev 86992)
@@ -46,6 +46,8 @@
bool isFullScreen() const;
+ void close();
+
protected:
void enterFullScreenRepaintCompleted();
void exitFullScreenRepaintCompleted();
Modified: trunk/Source/WebKit2/ChangeLog (86991 => 86992)
--- trunk/Source/WebKit2/ChangeLog 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/ChangeLog 2011-05-20 22:36:21 UTC (rev 86992)
@@ -1,3 +1,25 @@
+2011-05-20 Jeremy Noble <jer.no...@apple.com>
+
+ 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-20 Anders Carlsson <ander...@apple.com>
Reviewed by Dan Bernstein.
Modified: trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp (86991 => 86992)
--- trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp 2011-05-20 22:36:21 UTC (rev 86992)
@@ -49,11 +49,6 @@
{
}
-void WebFullScreenManagerProxy::invalidate()
-{
- m_webView = 0;
-}
-
void WebFullScreenManagerProxy::setWebView(PlatformWebView* webView)
{
m_webView = webView;
Modified: trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp (86991 => 86992)
--- trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp 2011-05-20 22:36:21 UTC (rev 86992)
@@ -31,6 +31,11 @@
namespace WebKit {
+void WebFullScreenManagerProxy::invalidate()
+{
+ m_webView = 0;
+}
+
void WebFullScreenManagerProxy::enterFullScreen()
{
notImplemented();
Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h (86991 => 86992)
--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h 2011-05-20 22:36:21 UTC (rev 86992)
@@ -69,6 +69,7 @@
- (void)enterAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)context;
- (void)exitAcceleratedCompositingMode;
- (WebCore::IntRect)getFullScreenRect;
+- (void)close;
@end
Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (86991 => 86992)
--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2011-05-20 22:36:21 UTC (rev 86992)
@@ -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: trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm (86991 => 86992)
--- trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm 2011-05-20 22:36:21 UTC (rev 86992)
@@ -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: trunk/Source/WebKit2/UIProcess/win/WebFullScreenManagerProxyWin.cpp (86991 => 86992)
--- trunk/Source/WebKit2/UIProcess/win/WebFullScreenManagerProxyWin.cpp 2011-05-20 22:34:03 UTC (rev 86991)
+++ trunk/Source/WebKit2/UIProcess/win/WebFullScreenManagerProxyWin.cpp 2011-05-20 22:36:21 UTC (rev 86992)
@@ -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)