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
This commit is contained in:
dveditz%cruzio.com
2007-04-30 19:04:54 +00:00
parent 47bf768914
commit 1eff0ea0f5
2 changed files with 7 additions and 5 deletions

View File

@@ -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 {

View File

@@ -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) {}