Bug 509055: Changing document.title does not change SHEntry's title if document was loaded from history. r=smaug

This commit is contained in:
Justin Lebar
2009-08-10 13:45:09 -07:00
parent 7c7f57703f
commit dc5fd0a94f
4 changed files with 108 additions and 8 deletions
+4 -8
View File
@@ -4628,17 +4628,13 @@ nsDocShell::SetTitle(const PRUnichar * aTitle)
}
// Update SessionHistory with the document's title. If the
// page was loaded from history or the page bypassed history,
// there is no need to update the title. There is no need to
// go to mSessionHistory to update the title. Setting it in mOSHE
// would suffice.
if (mOSHE && (mLoadType != LOAD_BYPASS_HISTORY) &&
(mLoadType != LOAD_HISTORY) && (mLoadType != LOAD_ERROR_PAGE)) {
// Update SessionHistory with the document's title.
if (mOSHE && mLoadType != LOAD_BYPASS_HISTORY &&
mLoadType != LOAD_ERROR_PAGE) {
mOSHE->SetTitle(mTitle);
}
return NS_OK;
}