summaryrefslogtreecommitdiff
path: root/docshell
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-03-24 11:41:58 +0000
committerMoonchild <moonchild@palemoon.org>2021-03-24 11:41:58 +0000
commit021fecdedca2b32d80966411f51637126b58bc67 (patch)
treefba03cbb3297278680873f8e2dab3efc62bc5488 /docshell
parentc1b064b99f6874f9d670ba40f9d266cf4689539b (diff)
downloaduxp-021fecdedca2b32d80966411f51637126b58bc67.tar.gz
[docshell] Stop loading of the document if network load is stopped.
After all, stop means stop.
Diffstat (limited to 'docshell')
-rw-r--r--docshell/base/nsDocShell.cpp10
1 files changed, 9 insertions, 1 deletions
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<nsIContentViewer> cv = mContentViewer;
cv->Stop();
}
+ } else if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
+ // Stop the document loading only
+ if (mContentViewer) {
+ RefPtr<nsIDocument> doc = mContentViewer->GetDocument();
+ if (doc) {
+ doc->StopDocumentLoad();
+ }
+ }
}
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {