Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2903773002: Revert of Remove EventSender from ImageLoader (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index d4d34ef4b6a7d4f584f56bd7fe012ac7fa02fe28..3677190d1c8f8ebce5e3064f6b484bb6947760f4 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -193,6 +193,7 @@
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameFetchContext.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/ImageLoader.h"
#include "core/loader/NavigationScheduler.h"
#include "core/loader/PrerendererClient.h"
#include "core/loader/appcache/ApplicationCacheHost.h"
@@ -3043,6 +3044,11 @@
// onLoad event handler, as in Radar 3206524.
DetachParser();
+ if (GetFrame() && CanExecuteScripts(kNotAboutToExecuteScript)) {
+ ImageLoader::DispatchPendingLoadEvents();
+ ImageLoader::DispatchPendingErrorEvents();
+ }
+
// JS running below could remove the frame or destroy the LayoutView so we
// call those two functions repeatedly and don't save them on the stack.
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/resources/srcset-helper.js ('k') | third_party/WebKit/Source/core/events/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698