- Revision
- 157534
- Author
- [email protected]
- Date
- 2013-10-16 15:20:13 -0700 (Wed, 16 Oct 2013)
Log Message
A page should exit fullscreen mode if it opens a new popup
https://bugs.webkit.org/show_bug.cgi?id=122865
Reviewed by Jer Noble.
Source/WebKit/blackberry:
If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::createWindow):
Source/WebKit/efl:
If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.
* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::createWindow):
Source/WebKit/gtk:
If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::createWindow):
Source/WebKit/mac:
If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createWindow):
Source/WebKit/win:
If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::createWindow):
Source/WebKit2:
If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
LayoutTests:
* fullscreen/full-screen-exit-when-popup-expected.txt: Added.
* fullscreen/full-screen-exit-when-popup.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (157533 => 157534)
--- trunk/LayoutTests/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/LayoutTests/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,13 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ * fullscreen/full-screen-exit-when-popup-expected.txt: Added.
+ * fullscreen/full-screen-exit-when-popup.html: Added.
+
2013-10-16 Oliver Hunt <[email protected]>
Implement spread
Added: trunk/LayoutTests/fullscreen/full-screen-exit-when-popup-expected.txt (0 => 157534)
--- trunk/LayoutTests/fullscreen/full-screen-exit-when-popup-expected.txt (rev 0)
+++ trunk/LayoutTests/fullscreen/full-screen-exit-when-popup-expected.txt 2013-10-16 22:20:13 UTC (rev 157534)
@@ -0,0 +1,9 @@
+EVENT(webkitfullscreenchange)
+EXPECTED (document.webkitIsFullScreen == 'true') OK
+EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLSpanElement]') OK
+EXPECTED (window.open('about:blank') != 'null') OK
+EVENT(webkitfullscreenchange)
+EXPECTED (document.webkitIsFullScreen == 'false') OK
+EXPECTED (document.webkitCurrentFullScreenElement == 'undefined') OK
+END OF TEST
+
Added: trunk/LayoutTests/fullscreen/full-screen-exit-when-popup.html (0 => 157534)
--- trunk/LayoutTests/fullscreen/full-screen-exit-when-popup.html (rev 0)
+++ trunk/LayoutTests/fullscreen/full-screen-exit-when-popup.html 2013-10-16 22:20:13 UTC (rev 157534)
@@ -0,0 +1,40 @@
+<body>
+<script src=""
+<span></span>
+<script>
+ // Bail out early if the full screen API is not enabled or is missing:
+ if (Element.prototype.webkitRequestFullScreen == undefined) {
+ logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
+ endTest();
+ } else {
+ if (window.testRunner) {
+ testRunner.setCanOpenWindows(true);
+ testRunner.setCloseRemainingWindowsWhenComplete(true);
+ }
+ var callback;
+ var fullscreenChanged = function(event)
+ {
+ if (callback)
+ callback(event)
+ };
+ waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
+
+ var spanEnteredFullScreen = function() {
+ testExpected("document.webkitIsFullScreen", true);
+ testExpected("document.webkitCurrentFullScreenElement", span);
+ callback = cancelledFullScreen;
+ testExpected("window.open('about:blank')", null, "!=");
+ };
+
+ var cancelledFullScreen = function() {
+ testExpected("document.webkitIsFullScreen", false);
+ testExpected("document.webkitCurrentFullScreenElement", undefined);
+ endTest();
+ };
+
+ var span = document.getElementsByTagName('span')[0];
+
+ callback = spanEnteredFullScreen;
+ runWithKeyDown(function(){span.webkitRequestFullScreen()});
+ }
+</script>
Modified: trunk/Source/WebKit/blackberry/ChangeLog (157533 => 157534)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,17 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ If a fullscreen page opens a popup, the popup would be hidden and
+ therefore invisible to the user. To avoid this, exit fullscreen mode
+ before opening a new window.
+
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::createWindow):
+
2013-10-13 Darin Adler <[email protected]>
Deprecate or remove deleteAllValues functions; there are only a few call sites left
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (157533 => 157534)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2013-10-16 22:20:13 UTC (rev 157534)
@@ -233,6 +233,11 @@
return 0;
#endif
+#if ENABLE(FULLSCREEN_API)
+ if (Element* element = frame->document() ? frame->document()->webkitCurrentFullScreenElement() : 0)
+ frame->document()->webkitCancelFullScreen();
+#endif
+
int x = features.xSet ? features.x : 0;
int y = features.ySet ? features.y : 0;
int width = features.widthSet? features.width : -1;
Modified: trunk/Source/WebKit/efl/ChangeLog (157533 => 157534)
--- trunk/Source/WebKit/efl/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/efl/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,17 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ If a fullscreen page opens a popup, the popup would be hidden and
+ therefore invisible to the user. To avoid this, exit fullscreen mode
+ before opening a new window.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::createWindow):
+
2013-10-07 Sam Weinig <[email protected]>
Consolidate findString functions
Modified: trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp (157533 => 157534)
--- trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp 2013-10-16 22:20:13 UTC (rev 157534)
@@ -150,8 +150,13 @@
evas_object_focus_set(m_view, EINA_FALSE);
}
-Page* ChromeClientEfl::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction&)
+Page* ChromeClientEfl::createWindow(Frame* frame, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction&)
{
+#if ENABLE(FULLSCREEN_API)
+ if (frame->document() && frame->document()->webkitCurrentFullScreenElement())
+ frame->document()->webkitCancelFullScreen();
+#endif
+
Evas_Object* newView = ewk_view_window_create(m_view, EINA_TRUE, &features);
if (!newView)
return 0;
Modified: trunk/Source/WebKit/gtk/ChangeLog (157533 => 157534)
--- trunk/Source/WebKit/gtk/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/gtk/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,17 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ If a fullscreen page opens a popup, the popup would be hidden and
+ therefore invisible to the user. To avoid this, exit fullscreen mode
+ before opening a new window.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::createWindow):
+
2013-10-09 Mario Sanchez Prada <[email protected]>
[ATK] Implement new API in AtkText: atk_text_get_string_at_offset()
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp (157533 => 157534)
--- trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp 2013-10-16 22:20:13 UTC (rev 157534)
@@ -204,6 +204,11 @@
{
WebKitWebView* webView = 0;
+#if ENABLE(FULLSCREEN_API)
+ if (frame->document() && frame->document()->webkitCurrentFullScreenElement())
+ frame->document()->webkitCancelFullScreen();
+#endif
+
g_signal_emit_by_name(m_webView, "create-web-view", kit(frame), &webView);
if (!webView)
Modified: trunk/Source/WebKit/mac/ChangeLog (157533 => 157534)
--- trunk/Source/WebKit/mac/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,17 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ If a fullscreen page opens a popup, the popup would be hidden and
+ therefore invisible to the user. To avoid this, exit fullscreen mode
+ before opening a new window.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::createWindow):
+
2013-10-15 Dean Jackson <[email protected]>
Add ENABLE_WEB_ANIMATIONS flag
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (157533 => 157534)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm 2013-10-16 22:20:13 UTC (rev 157534)
@@ -219,6 +219,11 @@
{
id delegate = [m_webView UIDelegate];
WebView *newWebView;
+
+#if ENABLE(FULLSCREEN_API)
+ if (frame->document() && frame->document()->webkitCurrentFullScreenElement())
+ frame->document()->webkitCancelFullScreen();
+#endif
if ([delegate respondsToSelector:@selector(webView:createWebViewWithRequest:windowFeatures:)]) {
NSNumber *x = features.xSet ? [[NSNumber alloc] initWithFloat:features.x] : nil;
Modified: trunk/Source/WebKit/win/ChangeLog (157533 => 157534)
--- trunk/Source/WebKit/win/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/win/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,17 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ If a fullscreen page opens a popup, the popup would be hidden and
+ therefore invisible to the user. To avoid this, exit fullscreen mode
+ before opening a new window.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::createWindow):
+
2013-10-15 Joseph Pecoraro <[email protected]>
Web Inspector: Remove Windows old front-end related code
Modified: trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp (157533 => 157534)
--- trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp 2013-10-16 22:20:13 UTC (rev 157534)
@@ -194,12 +194,17 @@
return COMPtr<IPropertyBag>(AdoptCOM, COMPropertyBag<COMVariant>::adopt(map));
}
-Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction& navigationAction)
+Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction& navigationAction)
{
COMPtr<IWebUIDelegate> delegate = uiDelegate();
if (!delegate)
return 0;
+#if ENABLE(FULLSCREEN_API)
+ if (frame->document() && frame->document()->webkitCurrentFullScreenElement())
+ frame->document()->webkitCancelFullScreen();
+#endif
+
COMPtr<WebMutableURLRequest> request = adoptCOM(WebMutableURLRequest::createInstance(ResourceRequest(navigationAction.url())));
COMPtr<IWebUIDelegatePrivate2> delegatePrivate(Query, delegate);
Modified: trunk/Source/WebKit2/ChangeLog (157533 => 157534)
--- trunk/Source/WebKit2/ChangeLog 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit2/ChangeLog 2013-10-16 22:20:13 UTC (rev 157534)
@@ -1,3 +1,17 @@
+2013-10-16 Jochen Eisinger <[email protected]>
+
+ A page should exit fullscreen mode if it opens a new popup
+ https://bugs.webkit.org/show_bug.cgi?id=122865
+
+ Reviewed by Jer Noble.
+
+ If a fullscreen page opens a popup, the popup would be hidden and
+ therefore invisible to the user. To avoid this, exit fullscreen mode
+ before opening a new window.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::createWindow):
+
2013-10-16 Brady Eidson <[email protected]>
Blind attempt to fix non-DATABASE_PROCESS builds.
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (157533 => 157534)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2013-10-16 22:17:24 UTC (rev 157533)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2013-10-16 22:20:13 UTC (rev 157534)
@@ -185,11 +185,16 @@
WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID());
}
-Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction)
+Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction)
{
uint32_t modifiers = static_cast<uint32_t>(InjectedBundleNavigationAction::modifiersForNavigationAction(navigationAction));
int32_t mouseButton = static_cast<int32_t>(InjectedBundleNavigationAction::mouseButtonForNavigationAction(navigationAction));
+#if ENABLE(FULLSCREEN_API)
+ if (frame->document() && frame->document()->webkitCurrentFullScreenElement())
+ frame->document()->webkitCancelFullScreen();
+#endif
+
uint64_t newPageID = 0;
WebPageCreationParameters parameters;
if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::CreateNewPage(request.resourceRequest(), windowFeatures, modifiers, mouseButton), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page->pageID()))