[docshell] Stop loading of the document if network load is stopped.

After all, stop means stop.
This commit is contained in:
Moonchild
2021-03-24 11:41:58 +00:00
committed by roytam1
parent da2461fa57
commit 43ebe6d86f
+9 -1
View File
@@ -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) {