Commit fefbc4d0 authored by andersca@apple.com's avatar andersca@apple.com

Remove supportMultipleWindows setting

https://bugs.webkit.org/show_bug.cgi?id=126772

Reviewed by Beth Dakin.

Source/WebCore:

This setting was added in https://bugs.webkit.org/show_bug.cgi?id=99716 for the Chromium port
and is unused by everyone else so get rid of it.

* loader/FrameLoader.cpp:
(WebCore::createWindow):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
* page/Settings.in:

LayoutTests:

* fast/dom/HTMLAnchorElement/anchor-no-multiple-windows-expected.txt: Removed.
* fast/dom/HTMLAnchorElement/anchor-no-multiple-windows.html: Removed.
* fast/dom/Window/window-open-no-multiple-windows-expected.txt: Removed.
* fast/dom/Window/window-open-no-multiple-windows.html: Removed.
* fast/forms/post-popup-no-multiple-windows-expected.txt: Removed.
* fast/forms/post-popup-no-multiple-windows.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 049d8b3d
2014-01-10 Anders Carlsson <andersca@apple.com>
Remove supportMultipleWindows setting
https://bugs.webkit.org/show_bug.cgi?id=126772
Reviewed by Beth Dakin.
* fast/dom/HTMLAnchorElement/anchor-no-multiple-windows-expected.txt: Removed.
* fast/dom/HTMLAnchorElement/anchor-no-multiple-windows.html: Removed.
* fast/dom/Window/window-open-no-multiple-windows-expected.txt: Removed.
* fast/dom/Window/window-open-no-multiple-windows.html: Removed.
* fast/forms/post-popup-no-multiple-windows-expected.txt: Removed.
* fast/forms/post-popup-no-multiple-windows.html: Removed.
2014-01-09 Benjamin Poulain <bpoulain@apple.com>
Remove the BlackBerry files outside WebCore
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();
}
function click(elmt)
{
var event = document.createEvent('MouseEvent');
event.initEvent('click', true, true);
elmt.dispatchEvent(event);
}
function runTest()
{
if (window.testRunner)
var windowCount = testRunner.windowCount();
var link = document.getElementById("link");
click(link);
if (window.testRunner) {
if (windowCount != testRunner.windowCount())
document.writeln('FAIL: Popup opened in a new window');
else
document.writeln('PASS: Popup opened in the same window');
testRunner.notifyDone();
}
}
window.addEventListener('load', runTest, true);
</script>
</head>
<body>
You need popups to be enabled to run this test.
<a id="link" target="_blank" href="data:text/html;charset=utf-8,<html><body>The test passes if this page opens in the same window</body></html>">Click me!</a>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();
}
function runTest()
{
if (window.testRunner)
var windowCount = testRunner.windowCount();
var result = window.open('data:text/html;charset=utf-8,<html><body>The test passes if this page opens in the same window</body></html>');
if (window.testRunner) {
if (!result)
document.writeln('FAIL: window.open failed. You need popups to be enabled to run this test.');
else if (windowCount != testRunner.windowCount())
document.writeln('FAIL: Popup opened in a new window');
else
document.writeln('PASS: Popup opened in the same window');
testRunner.notifyDone();
}
}
window.addEventListener('load', runTest, true);
</script>
</head>
<body>
You need popups to be enabled to run this test.
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();
}
function click(elmt)
{
var event = document.createEvent('MouseEvent');
event.initEvent('click', true, true);
elmt.dispatchEvent(event);
}
function runTest()
{
if (window.testRunner)
testRunner.initialWindowCount = testRunner.windowCount();
var button = document.getElementById("post-button");
click(button);
if (window.testRunner) {
start = new Date();
testInterval = setInterval(checkIfDone, 1);
}
}
function checkIfDone ()
{
if (testRunner.globalFlag) {
document.writeln('FAIL: Popup opened in a new window');
clearInterval(testInterval);
testRunner.notifyDone();
} else if ((new Date() - start) > 10000) {
document.writeln('FAIL: Popup did not open');
clearInterval(testInterval);
testRunner.notifyDone();
}
}
window.addEventListener('load', runTest, true);
</script>
</head>
<body>
You need popups to be enabled to run this test.
<form method="post" target="_blank" action="data:text/html;charset=utf-8,<html><head><script>function test() { if (!window.testRunner) return; testRunner.globalFlag=1; if (testRunner.initialWindowCount != testRunner.windowCount()) return; document.writeln('PASS: Popup opened in the same window'); testRunner.notifyDone(); }</script></head><body onload='test()'>The test passes if this page opens in the same window</body></html>">
<input id="post-button" type="submit" value="Click me!" />
</form>
</body>
</html>
2014-01-10 Anders Carlsson <andersca@apple.com>
Remove supportMultipleWindows setting
https://bugs.webkit.org/show_bug.cgi?id=126772
Reviewed by Beth Dakin.
This setting was added in https://bugs.webkit.org/show_bug.cgi?id=99716 for the Chromium port
and is unused by everyone else so get rid of it.
* loader/FrameLoader.cpp:
(WebCore::createWindow):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
* page/Settings.in:
2014-01-10 Benjamin Poulain <bpoulain@apple.com>
Remove the BlackBerry port from trunk
......@@ -3528,11 +3528,6 @@ PassRefPtr<Frame> createWindow(Frame* openerFrame, Frame* lookupFrame, const Fra
requestWithReferrer.resourceRequest().setHTTPReferrer(referrer);
FrameLoader::addHTTPOriginIfNeeded(requestWithReferrer.resourceRequest(), openerFrame->loader().outgoingOrigin());
if (!openerFrame->settings().supportsMultipleWindows()) {
created = false;
return openerFrame;
}
Page* oldPage = openerFrame->page();
if (!oldPage)
return 0;
......
......@@ -172,17 +172,18 @@ void ContextMenuController::showContextMenu(Event* event)
static void openNewWindow(const URL& urlToLoad, Frame* frame)
{
if (Page* oldPage = frame->page()) {
FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer()));
Page* newPage = oldPage;
if (frame->settings().supportsMultipleWindows()) {
newPage = oldPage->chrome().createWindow(frame, request, WindowFeatures(), NavigationAction(request.resourceRequest()));
if (!newPage)
return;
newPage->chrome().show();
}
newPage->mainFrame().loader().loadFrameRequest(request, false, false, 0, 0, MaybeSendReferrer);
}
Page* oldPage = frame->page();
if (!oldPage)
return;
FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer()));
Page* newPage = oldPage;
newPage = oldPage->chrome().createWindow(frame, request, WindowFeatures(), NavigationAction(request.resourceRequest()));
if (!newPage)
return;
newPage->chrome().show();
newPage->mainFrame().loader().loadFrameRequest(request, false, false, 0, 0, MaybeSendReferrer);
}
#if PLATFORM(GTK)
......
......@@ -50,7 +50,6 @@ localStorageEnabled initial=false
allowUniversalAccessFromFileURLs initial=true
allowFileAccessFromFileURLs initial=true
javaScriptCanOpenWindowsAutomatically initial=false
supportsMultipleWindows initial=true
javaScriptCanAccessClipboard initial=false
shouldPrintBackgrounds initial=false
usesDashboardBackwardCompatibilityMode initial=false, conditional=DASHBOARD_SUPPORT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment