From b1aa689e2b656a614d8e2409ef2ebc8bc25edbf0 Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Mon, 18 Oct 1999 19:09:27 +0000 Subject: [PATCH] Mail news regresion with replying to a message. r=mscott bug # 16550 git-svn-id: svn://10.0.0.236/trunk@51005 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 34 +++++++++++++++++----------- mozilla/webshell/src/nsWebShell.cpp | 34 +++++++++++++++++----------- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index c2410d54038..ad6da9714f5 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -2008,37 +2008,45 @@ nsWebShell::DoLoadURL(nsIURI * aUri, rv = docViewer->GetPresShell(*getter_AddRefs(presShell)); if (NS_SUCCEEDED(rv) && presShell) { - /* Pass OnStartDocument notifications to the docloaderobserver - * so that urlbar, forward/back buttons will - * behave properly when going to named anchors - */ + /* Pass OnStartDocument notifications to the docloaderobserver + * so that urlbar, forward/back buttons will + * behave properly when going to named anchors + */ nsCOMPtr dummyChannel; rv = NS_OpenURI(getter_AddRefs(dummyChannel), aUri, nsnull); if (NS_FAILED(rv)) return rv; - rv = OnStartDocumentLoad(mDocLoader, aUri, "load"); - if (nsnull != (const char *) ref) { - // Go to the anchor in the current document - rv = presShell->GoToAnchor(nsAutoString(ref)); + rv = OnStartDocumentLoad(mDocLoader, aUri, "load"); + // Go to the anchor in the current document + rv = presShell->GoToAnchor(nsAutoString(ref)); + mProcessedEndDocumentLoad = PR_FALSE; + // Pass on status of scrolling/anchor visit to docloaderobserver + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + return rv; } else if (aType == nsISessionHistory::LOAD_HISTORY) { + rv = OnStartDocumentLoad(mDocLoader, aUri, "load"); // Go to the top of the current document nsCOMPtr viewMgr; rv = presShell->GetViewManager(getter_AddRefs(viewMgr)); if (NS_SUCCEEDED(rv) && viewMgr) { nsIScrollableView* view; rv = viewMgr->GetRootScrollableView(&view); - - if (NS_SUCCEEDED(rv) && view) + if (NS_SUCCEEDED(rv) && view) rv = view->ScrollTo(0, 0, NS_VMREFRESH_IMMEDIATE); - - } // NS_SUCCEEDED(rv) - } + mProcessedEndDocumentLoad = PR_FALSE; + // Pass on status of scrolling/anchor visit to docloaderobserver + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + return rv; + } + } +#if 0 mProcessedEndDocumentLoad = PR_FALSE; // Pass on status of scrolling/anchor visit to docloaderobserver rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); return rv; +#endif /* 0 */ } // NS_SUCCEEDED(rv) && presShell } // EqualBaseURLs(docURL, url) } diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index c2410d54038..ad6da9714f5 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -2008,37 +2008,45 @@ nsWebShell::DoLoadURL(nsIURI * aUri, rv = docViewer->GetPresShell(*getter_AddRefs(presShell)); if (NS_SUCCEEDED(rv) && presShell) { - /* Pass OnStartDocument notifications to the docloaderobserver - * so that urlbar, forward/back buttons will - * behave properly when going to named anchors - */ + /* Pass OnStartDocument notifications to the docloaderobserver + * so that urlbar, forward/back buttons will + * behave properly when going to named anchors + */ nsCOMPtr dummyChannel; rv = NS_OpenURI(getter_AddRefs(dummyChannel), aUri, nsnull); if (NS_FAILED(rv)) return rv; - rv = OnStartDocumentLoad(mDocLoader, aUri, "load"); - if (nsnull != (const char *) ref) { - // Go to the anchor in the current document - rv = presShell->GoToAnchor(nsAutoString(ref)); + rv = OnStartDocumentLoad(mDocLoader, aUri, "load"); + // Go to the anchor in the current document + rv = presShell->GoToAnchor(nsAutoString(ref)); + mProcessedEndDocumentLoad = PR_FALSE; + // Pass on status of scrolling/anchor visit to docloaderobserver + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + return rv; } else if (aType == nsISessionHistory::LOAD_HISTORY) { + rv = OnStartDocumentLoad(mDocLoader, aUri, "load"); // Go to the top of the current document nsCOMPtr viewMgr; rv = presShell->GetViewManager(getter_AddRefs(viewMgr)); if (NS_SUCCEEDED(rv) && viewMgr) { nsIScrollableView* view; rv = viewMgr->GetRootScrollableView(&view); - - if (NS_SUCCEEDED(rv) && view) + if (NS_SUCCEEDED(rv) && view) rv = view->ScrollTo(0, 0, NS_VMREFRESH_IMMEDIATE); - - } // NS_SUCCEEDED(rv) - } + mProcessedEndDocumentLoad = PR_FALSE; + // Pass on status of scrolling/anchor visit to docloaderobserver + rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); + return rv; + } + } +#if 0 mProcessedEndDocumentLoad = PR_FALSE; // Pass on status of scrolling/anchor visit to docloaderobserver rv = OnEndDocumentLoad(mDocLoader, dummyChannel, rv, this); return rv; +#endif /* 0 */ } // NS_SUCCEEDED(rv) && presShell } // EqualBaseURLs(docURL, url) }