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

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

Issue 725593004: Prevent the load event from firing inside DOMContentLoaded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 581bd951484e77c319e9d868fd074afaad4b7d4d..59700cf4777adc789652c2fec7f484b563112f90 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -181,7 +181,7 @@ void FrameLoader::stopLoading()
{
if (m_frame->document() && m_frame->document()->parsing()) {
finishedParsing();
- m_frame->document()->setParsing(false);
+ m_frame->document()->setParsingState(Document::Done);
}
if (Document* doc = m_frame->document()) {
@@ -468,7 +468,7 @@ void FrameLoader::checkCompleted()
return;
// Are we still parsing?
- if (m_frame->document()->parsing())
+ if (m_frame->document()->parsing() || m_frame->document()->isInDOMContentLoaded())
return;
// Still waiting imports?

Powered by Google App Engine
This is Rietveld 408576698