merge; augh

This commit is contained in:
Rob Campbell 2012-07-24 15:37:05 -07:00
commit abddf62f19

View File

@ -1214,9 +1214,10 @@
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tab");
var blank = !aURI || (aURI == "about:blank");
var uriIsBlankPage = !aURI || isBlankPageURL(aURI);
var uriIsNotAboutBlank = aURI && aURI != "about:blank";
if (blank)
if (uriIsBlankPage)
t.setAttribute("label", this.mStringBundle.getString("tabs.emptyTabTitle"));
else
t.setAttribute("label", aURI);
@ -1328,8 +1329,15 @@
this.tabContainer.updateVisibility();
if (uriIsNotAboutBlank) {
// Stop the existing about:blank load. Otherwise, if aURI
// doesn't stop in-progress loads on its own, we'll get into
// trouble with multiple parallel loads running at once.
b.stop();
}
// wire up a progress listener for the new browser object.
var tabListener = this.mTabProgressListener(t, b, blank);
var tabListener = this.mTabProgressListener(t, b, uriIsBlankPage);
const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
.createInstance(Components.interfaces.nsIWebProgress);
filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
@ -1351,15 +1359,10 @@
evt.initEvent("TabOpen", true, false);
t.dispatchEvent(evt);
if (!blank) {
// Stop the existing about:blank load. Otherwise, if aURI
// doesn't stop in-progress loads on its own, we'll get into
// trouble with multiple parallel loads running at once.
b.stop();
if (uriIsNotAboutBlank) {
// pretend the user typed this so it'll be available till
// the document successfully loads
if (!isBlankPageURL(aURI))
if (!uriIsBlankPage)
b.userTypedValue = aURI;
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;