mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Stop treating _new as a special window target. No other browser does. Bug 417067, r+sr=jst, a=beltzner
This commit is contained in:
parent
d2a6517917
commit
41f1d79e6e
@ -327,7 +327,6 @@ function checkForLink(elem, htmllocalname)
|
||||
setInfo("link-target", gMetadataBundle.getString("parentFrameText"));
|
||||
break;
|
||||
case "_blank":
|
||||
case "_new":
|
||||
var where = "Window";
|
||||
var newWindowPref = prefs.getIntPref("browser.link.open_newwindow");
|
||||
if (newWindowPref == 3)
|
||||
|
@ -2028,8 +2028,7 @@ nsDocShell::FindItemWithName(const PRUnichar * aName,
|
||||
if (name.LowerCaseEqualsLiteral("_self")) {
|
||||
foundItem = this;
|
||||
}
|
||||
else if (name.LowerCaseEqualsLiteral("_blank") ||
|
||||
name.LowerCaseEqualsLiteral("_new"))
|
||||
else if (name.LowerCaseEqualsLiteral("_blank"))
|
||||
{
|
||||
// Just return null. Caller must handle creating a new window with
|
||||
// a blank name himself.
|
||||
|
@ -738,11 +738,10 @@ nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow *aParent,
|
||||
|
||||
/* allow a window that we found by name to keep its name (important for cases
|
||||
like _self where the given name is different (and invalid)). Also, _blank
|
||||
and _new are not window names. */
|
||||
is not a window name. */
|
||||
if (windowNeedsName)
|
||||
newDocShellItem->SetName(nameSpecified &&
|
||||
!name.LowerCaseEqualsLiteral("_blank") &&
|
||||
!name.LowerCaseEqualsLiteral("_new") ?
|
||||
!name.LowerCaseEqualsLiteral("_blank") ?
|
||||
name.get() : nsnull);
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_largemenu.xul", "_new", "chrome,width=200,height=200");
|
||||
window.open("window_largemenu.xul", "_blank", "chrome,width=200,height=200");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -26,7 +26,7 @@ function runTest()
|
||||
// test can fail on Mac
|
||||
synthesizeMouse(document.documentElement, 1, 1, { type: "mousemove" });
|
||||
|
||||
window.open("window_panel_focus.xul", "_new", "chrome,width=600,height=600");
|
||||
window.open("window_panel_focus.xul", "_blank", "chrome,width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_popup_anchor.xul", "_new", "chrome,width=600,height=600");
|
||||
window.open("window_popup_anchor.xul", "_blank", "chrome,width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_popup_preventdefault_chrome.xul", "_new", "chrome,width=600,height=600");
|
||||
window.open("window_popup_preventdefault_chrome.xul", "_blank", "chrome,width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_menubar.xul", "_new", "width=600,height=600");
|
||||
window.open("window_menubar.xul", "_blank", "width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_menuchecks.xul", "_new", "width=600,height=600");
|
||||
window.open("window_menuchecks.xul", "_blank", "width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_popup_attribute.xul", "_new", "width=600,height=600");
|
||||
window.open("window_popup_attribute.xul", "_blank", "width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_popup_button.xul", "_new", "width=600,height=600");
|
||||
window.open("window_popup_button.xul", "_blank", "width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function runTest()
|
||||
{
|
||||
window.open("window_tooltip.xul", "_new", "width=600,height=600");
|
||||
window.open("window_tooltip.xul", "_blank", "width=600,height=600");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user