From 43ebe6d86f80efabcf3b87fcbc0a1b8e6f9bbf9e Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 24 Mar 2021 11:41:58 +0000 Subject: [PATCH] [docshell] Stop loading of the document if network load is stopped. After all, stop means stop. --- docshell/base/nsDocShell.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 0ceb70a304..c40fbd7a10 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -5449,11 +5449,19 @@ nsDocShell::Stop(uint32_t aStopFlags) } if (nsIWebNavigation::STOP_CONTENT & aStopFlags) { - // Stop the document loading + // Stop the document loading and animations if (mContentViewer) { nsCOMPtr cv = mContentViewer; cv->Stop(); } + } else if (nsIWebNavigation::STOP_NETWORK & aStopFlags) { + // Stop the document loading only + if (mContentViewer) { + RefPtr doc = mContentViewer->GetDocument(); + if (doc) { + doc->StopDocumentLoad(); + } + } } if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {