summaryrefslogtreecommitdiffstats
path: root/layout/base/nsDocumentViewer.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-12-28 10:14:29 +0000
committerGitHub <noreply@github.com>2019-12-28 10:14:29 +0000
commit357405f6356e28e5fa94cecc078b65c20433d236 (patch)
tree9716965ca2d9d03446fc9290d37e5ef42f80558e /layout/base/nsDocumentViewer.cpp
parentf60bbaf9e49733e61aaec675276fcd898ef6bc73 (diff)
parent8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9 (diff)
downloadUXP-357405f6356e28e5fa94cecc078b65c20433d236.tar
UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.gz
UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.lz
UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.xz
UXP-357405f6356e28e5fa94cecc078b65c20433d236.zip
Merge pull request #1335 from MoonchildProductions/document_open
Align document.open() with the overhauled specification
Diffstat (limited to 'layout/base/nsDocumentViewer.cpp')
-rw-r--r--layout/base/nsDocumentViewer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index 5478c61b0..8baf1a464 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -998,6 +998,9 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
// will depend on whether it's cached!
if(window &&
(NS_SUCCEEDED(aStatus) || aStatus == NS_ERROR_PARSED_DATA_CACHED)) {
+ // If this code changes, the code in nsDocLoader::DocLoaderIsEmpty
+ // that fires load events for document.open() cases might need to
+ // be updated too.
nsEventStatus status = nsEventStatus_eIgnore;
WidgetEvent event(true, eLoad);
event.mFlags.mBubbles = false;
@@ -1063,7 +1066,9 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
MakeUnique<DocLoadingTimelineMarker>("document::Load"));
}
+ d->SetLoadEventFiring(true);
EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);
+ d->SetLoadEventFiring(false);
if (timing) {
timing->NotifyLoadEventEnd();
}