зеркало из https://github.com/mozilla/pjs.git
Fix for bug # 96163. Bypass history load causes disorientation with page titles. r=valeski. sr=alecf
This commit is contained in:
Родитель
f69c9d1bb5
Коммит
a86430cb2e
|
@ -3115,19 +3115,13 @@ nsDocShell::SetTitle(const PRUnichar * aTitle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update SessionHistory too with Title. Otherwise entry for current page
|
// Update SessionHistory with the document's title. If the
|
||||||
// has previous page's title.
|
// page was loaded from history or the page bypassed history,
|
||||||
if (mSessionHistory) {
|
// there is no need to update the title. There is no need to
|
||||||
PRInt32 index = -1;
|
// go to mSessionHistory to update the title. Setting it in mOSHE
|
||||||
mSessionHistory->GetIndex(&index);
|
// would suffice.
|
||||||
nsCOMPtr<nsIHistoryEntry> hEntry;
|
if (mOSHE && (mLoadType != LOAD_BYPASS_HISTORY) && (mLoadType != LOAD_HISTORY)) {
|
||||||
mSessionHistory->GetEntryAtIndex(index, PR_FALSE,
|
mOSHE->SetTitle(mTitle.get());
|
||||||
getter_AddRefs(hEntry));
|
|
||||||
if (hEntry) {
|
|
||||||
nsCOMPtr<nsISHEntry> shEntry(do_QueryInterface(hEntry));
|
|
||||||
if (shEntry)
|
|
||||||
shEntry->SetTitle(mTitle.get());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче