Chromium Code Reviews

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 672843002: Delay dispatching DOMContentLoaded event to next event loop. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: hmm Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index a1583c411d1ef3f840e7714411e2f05d0f7891e9..79f3a682839485bc3dc8d043d7aaf3f72d0027fd 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -966,6 +966,8 @@ static bool isDocumentDoneLoading(Document* document)
return true;
if (document->loader()->isLoadingMainResource())
return false;
+ if (!document->hasFiredDOMContentLoadedEvent())
+ return false;
if (!document->loadEventFinished()) {
if (document->loader()->isLoading() || document->isDelayingLoadEvent())
return false;
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine