From 4438494c4ff4641148e64ea6d5ed706bf64ff100 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Sun, 29 Apr 2007 21:35:16 +0000 Subject: [PATCH] Fewer about:blank URLs should be hidden b=370555 r=CTho git-svn-id: svn://10.0.0.236/trunk@225233 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/suite/browser/navigator.js | 4 ++-- mozilla/suite/browser/nsBrowserStatusHandler.js | 2 +- mozilla/suite/browser/tabbrowser.xml | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/suite/browser/navigator.js b/mozilla/suite/browser/navigator.js index 3442430ec20..7358f64a56e 100644 --- a/mozilla/suite/browser/navigator.js +++ b/mozilla/suite/browser/navigator.js @@ -1555,7 +1555,7 @@ function BrowserLoadURL(aTriggeringEvent) null, null, nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP); // Reset url in the urlbar, copied from handleURLBarRevert() var oldURL = browser.currentURI.spec; - if (oldURL != "about:blank") { + if (oldURL != "about:blank" || content.opener) { gURLBar.value = oldURL; SetPageProxyState("valid", null); } else @@ -2208,7 +2208,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.hasAttribute("busy") && !isScrolling) { - if (url != "about:blank") { + if (url != "about:blank" || content.opener) { gURLBar.value = url; gURLBar.select(); SetPageProxyState("valid", null); // XXX Build a URI and pass it in here. diff --git a/mozilla/suite/browser/nsBrowserStatusHandler.js b/mozilla/suite/browser/nsBrowserStatusHandler.js index fcd7438c404..2a4e5dd21fc 100644 --- a/mozilla/suite/browser/nsBrowserStatusHandler.js +++ b/mozilla/suite/browser/nsBrowserStatusHandler.js @@ -316,7 +316,7 @@ nsBrowserStatusHandler.prototype = } } - if (!getWebNavigation().canGoBack && location == "about:blank") + if (!getWebNavigation().canGoBack && location == "about:blank" && !content.opener) location = ""; // Disable menu entries for images, enable otherwise diff --git a/mozilla/suite/browser/tabbrowser.xml b/mozilla/suite/browser/tabbrowser.xml index 16ca3d32d1e..96438fb1d17 100644 --- a/mozilla/suite/browser/tabbrowser.xml +++ b/mozilla/suite/browser/tabbrowser.xml @@ -657,7 +657,9 @@ if (docElement.getAttribute("chromehidden").indexOf("location") != -1) { var uri = this.mURIFixup.createExposableURI( this.mCurrentBrowser.currentURI); - if (uri.host) + if (uri.schemeIs("about")) + newTitle = uri.spec + sep + newTitle; + else if (uri.host) newTitle = uri.prePath + sep + newTitle; } } catch (e) {}