Fix the double reload problem in the editor, which fixes bug 14045 and maybe others.

This commit is contained in:
sfraser%netscape.com 1999-09-16 23:54:08 +00:00
Родитель 136fbc03b9
Коммит a68044b6d1
2 изменённых файлов: 22 добавлений и 10 удалений

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

@ -3071,11 +3071,17 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel,
nsIDocumentLoaderObserver * aObserver)
#endif // NECKO
{
#ifdef NECKO
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
#endif
return PrepareDocumentForEditing(aUrl);
// for pages with charsets, this gets called the first time with a
// non-zero status value. Don't prepare the editor that time.
// aStatus will be NS_BINDING_ABORTED then.
if (NS_SUCCEEDED(aStatus))
{
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
return PrepareDocumentForEditing(aUrl);
}
return NS_OK;
}
NS_IMETHODIMP

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

@ -3071,11 +3071,17 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel,
nsIDocumentLoaderObserver * aObserver)
#endif // NECKO
{
#ifdef NECKO
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
#endif
return PrepareDocumentForEditing(aUrl);
// for pages with charsets, this gets called the first time with a
// non-zero status value. Don't prepare the editor that time.
// aStatus will be NS_BINDING_ABORTED then.
if (NS_SUCCEEDED(aStatus))
{
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
return PrepareDocumentForEditing(aUrl);
}
return NS_OK;
}
NS_IMETHODIMP