summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsDocumentViewer.cpp5
-rw-r--r--layout/style/test/test_bug1232829.html1
2 files changed, 5 insertions, 1 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();
}
diff --git a/layout/style/test/test_bug1232829.html b/layout/style/test/test_bug1232829.html
index 8981d56e0..65bea2014 100644
--- a/layout/style/test/test_bug1232829.html
+++ b/layout/style/test/test_bug1232829.html
@@ -19,7 +19,6 @@ function boom() {
setTimeout(function() {
var frameDoc = document.querySelector("iframe").contentDocument;
frameDoc.write("3");
- frameDoc.defaultView.history.back();
requestAnimationFrame(function() {
popup.close();
ok(true, "Didn't crash");