Fix the double reload problem in the editor, which fixes bug 14045 and maybe others.
This commit is contained in:
Родитель
136fbc03b9
Коммит
a68044b6d1
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче