From 1eff0ea0f5054986c987d40d90297b6f0b20ef56 Mon Sep 17 00:00:00 2001 From: "dveditz%cruzio.com" Date: Mon, 30 Apr 2007 19:04:54 +0000 Subject: [PATCH] bug 370555 only hide about:blank location on truly blank pages. r=mconnor, a=release-drivers git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@225283 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 7 ++++--- mozilla/toolkit/content/widgets/tabbrowser.xml | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 29d89cb15b2..0dcabc8bc3c 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -2279,7 +2279,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"); @@ -3851,8 +3851,9 @@ nsBrowserStatusHandler.prototype = var location = aLocation.spec; - 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 { diff --git a/mozilla/toolkit/content/widgets/tabbrowser.xml b/mozilla/toolkit/content/widgets/tabbrowser.xml index 77f8b99ff39..aad041069d3 100644 --- a/mozilla/toolkit/content/widgets/tabbrowser.xml +++ b/mozilla/toolkit/content/widgets/tabbrowser.xml @@ -599,12 +599,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) {}