ESC key in full screen does not result in webkitFullScreenChange event.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 17:33:50 +0000 (17:33 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 17:33:50 +0000 (17:33 +0000)
commit6e556cd1458a194b34710eefbd340aabaae748c2
tree235bfeee37307664859d3f151eba385c3d6b2e91
parenta1bf9089f227940ad3af5878780d7c0edb196109
ESC key in full screen does not result in webkitFullScreenChange event.
https://bugs.webkit.org/show_bug.cgi?id=82755
<rdar://problem/11093513>

Reviewed by Eric Carlson.

Source/WebCore:

* WebCore.exp.in: Export the WebCore::Document::webkitCancelFullScreen() symbol.

Source/WebKit/mac:

Instead of exiting full screen directly, ask the document to initiate exiting full screen. This ensures
that the entire full screen element stack is cleared and that webkitFullScreenChange events are sent
out correctly.

* WebView/WebFullScreenController.mm:
(-[WebFullScreenController cancelOperation:]):
(-[WebFullScreenController requestExitFullScreen]):

Source/WebKit2:

Instead of exiting full screen directly, ask the document to initiate exiting full screen. This ensures
that the entire full screen element stack is cleared and that webkitFullScreenChange events are sent
out correctly.

Because the WebProcess may be stalled or hung, add a watchdog timer which will force an exit of full
screen if the WebProcess does not respond in a timely manner (defaults to 1s).

Add a new method, requestExitFullScreen, which calls through to the WebProcess and Document:
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::requestExitFullScreen):
* UIProcess/WebFullScreenManagerProxy.h:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::requestExitFullScreen):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/FullScreen/WebFullScreenManager.messages.in:

Request that the document exits full screen when the ESC key is pressed:
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController cancelOperation:]):
(-[WKFullScreenWindowController exitFullScreen]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFullScreenController.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp
Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.cpp
Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.h
Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.messages.in