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 7ef7d6f2a8
commit 19a9467bde
4 changed files with 142 additions and 1 deletions

View File

@@ -7940,7 +7940,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;
@@ -8025,6 +8025,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;