Bug 1690169 - StopDocumentLoad even on STOP_NETWORK. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D104696
This commit is contained in:
Henri Sivonen
2021-02-15 06:02:17 +00:00
parent 7fc330ac92
commit e0011f72ea

View File

@@ -4305,11 +4305,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<Document> doc = mContentViewer->GetDocument();
if (doc) {
doc->StopDocumentLoad();
}
}
}
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {