Bug 503832. Visiting a new fragmentid (scrolling to named anchor) should set the title of the page in the global history for the url with that anchor. r=bzbarsky

This commit is contained in:
Philipp von Weitershausen
2010-03-08 19:30:02 -05:00
parent 114084df0f
commit 4ea3b0b96f
4 changed files with 141 additions and 1 deletions

View File

@@ -7943,7 +7943,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
if (mOSHE) {
mOSHE->GetOwner(getter_AddRefs(owner));
}
OnNewURI(aURI, nsnull, owner, mLoadType, PR_TRUE);
OnNewURI(aURI, nsnull, owner, mLoadType, PR_TRUE, PR_TRUE);
nsCOMPtr<nsIInputStream> postData;
PRUint32 pageIdent = PR_UINT32_MAX;
@@ -8028,6 +8028,12 @@ nsDocShell::InternalLoad(nsIURI * aURI,
shEntry->SetTitle(mTitle);
}
/* Set the title for the Global History entry for this anchor url.
*/
if (mGlobalHistory) {
mGlobalHistory->SetPageTitle(aURI, mTitle);
}
if (sameDocIdent) {
// Set the doc's URI according to the new history entry's URI
nsCOMPtr<nsIURI> newURI;