further fixes for bug 102043 - add support for the hidePage() api when a redirected page is encountered

This commit is contained in:
alecf%netscape.com 2001-11-15 00:46:26 +00:00
Родитель d4b8310f1d
Коммит 4a8d72cfb4
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -110,14 +110,23 @@ nsHistoryLoadListener::OnStateChange(nsIWebProgress *aWebProgress,
} else { } else {
nsCOMPtr<nsIDOMHTMLDocument> htmlDoc = do_QueryInterface(doc); nsCOMPtr<nsIDOMHTMLDocument> htmlDoc = do_QueryInterface(doc);
// there should be a better way to handle non-html docs
if (!htmlDoc) return NS_OK;
// somehow get the title, and store it in history // somehow get the title, and store it in history
nsAutoString title; nsAutoString title;
htmlDoc->GetTitle(title); htmlDoc->GetTitle(title);
mHistory->SetPageTitle(urlString, title.get()); mHistory->SetPageTitle(urlString, title.get());
#if 0
nsAutoString referrer;
htmlDoc->GetReferrer(referrer);
mHistory->SetReferrer(urlString, referrer.get());
#endif
} }
printf("nsHistoryLoadListener::OnStateChange(w,r, %8.8X, %d)\n", aStateFlags, aStatus); printf("nsHistoryLoadListener::OnStateChange(w,r, %8.8X, %d)\n", aStateFlags, aStatus);
return NS_ERROR_NOT_IMPLEMENTED; return NS_OK;
} }
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ /* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */