Bug 598020 - Tabs for pages without titles are labeled "New Tab" instead of with the file name until they start restoring. r=zpao a=relanding-after-accidental-backout

This commit is contained in:
Dão Gottwald 2010-09-21 11:15:44 +02:00
parent 9ab1f355f5
commit 92011af73a

View File

@ -2378,8 +2378,15 @@ SessionStoreService.prototype = {
browser.userTypedValue = activePageData ? activePageData.url || null : null;
// If the page has a title, set it.
if (activePageData && activePageData.title)
tab.label = activePageData.title;
if (activePageData) {
if (activePageData.title) {
tab.label = activePageData.title;
tab.crop = "end";
} else if (activePageData.url != "about:blank") {
tab.label = activePageData.url;
tab.crop = "center";
}
}
}
if (!this._isWindowLoaded(aWindow)) {