bug 370555 don't hide "about:blank" url when opened by another window, r=mconnor

This commit is contained in:
dveditz%cruzio.com 2007-04-28 21:29:08 +00:00
Родитель 5478dd7273
Коммит 62d49a9f17
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -2294,7 +2294,7 @@ function handleURLBarRevert()
// don't revert to last valid url unless page is NOT loading
// and user is NOT key-scrolling through autocomplete list
if ((!throbberElement || !throbberElement.hasAttribute("busy")) && !isScrolling) {
if (url != "about:blank") {
if (url != "about:blank" || content.opener) {
gURLBar.value = url;
gURLBar.select();
SetPageProxyState("valid");
@ -3842,8 +3842,9 @@ nsBrowserStatusHandler.prototype =
var browser = getBrowser().selectedBrowser;
if (aWebProgress.DOMWindow == content) {
if (location == "about:blank" || location == "") { //second condition is for new tabs, otherwise
location = ""; //reload function is enabled until tab is refreshed
if ((location == "about:blank" && !content.opener) ||
location == "") { //second condition is for new tabs, otherwise
location = ""; //reload function is enabled until tab is refreshed
this.reloadCommand.setAttribute("disabled", "true");
this.reloadSkipCacheCommand.setAttribute("disabled", "true");
} else {

Просмотреть файл

@ -620,12 +620,13 @@
// If location bar is hidden and the URL type supports a host,
// add the scheme and host to the title to prevent spoofing.
// XXX https://bugzilla.mozilla.org/show_bug.cgi?id=22183#c239
// (only for schemes that support a host)
try {
if (docElement.getAttribute("chromehidden").indexOf("location") != -1) {
var uri = this.mURIFixup.createExposableURI(
this.mCurrentBrowser.currentURI);
if (uri.host)
if (uri.scheme == "about")
newTitle = uri.spec + sep + newTitle;
else
newTitle = uri.prePath + sep + newTitle;
}
} catch (e) {}