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

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

Issue 1910153002: Reland of DocumentLoader should commit the load before creating a DocumentWriter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index b165a2e788363496aed321df4557f0904602bf14..ccbee6fabbbe59bbb494caf7ef1bd0d28bb09e47 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -435,18 +435,28 @@ void FrameLoader::receivedFirstData()
dispatchDidClearDocumentOfWindowObject();
}
-void FrameLoader::didBeginDocument(bool dispatch)
+void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable)
{
ASSERT(m_frame);
ASSERT(m_frame->document());
- ASSERT(m_frame->document()->fetcher());
+
m_frame->document()->setReadyState(Document::Loading);
- if (dispatch)
+ if (dispatchWindowObjectAvailable)
dispatchDidClearDocumentOfWindowObject();
m_frame->document()->initContentSecurityPolicy(m_documentLoader ? m_documentLoader->releaseContentSecurityPolicy() : ContentSecurityPolicy::create());
+ if (m_provisionalItem && isBackForwardLoadType(m_loadType))
+ m_frame->document()->setStateForNewFormElements(m_provisionalItem->documentState());
+}
+
+void FrameLoader::didBeginDocument()
+{
+ ASSERT(m_frame);
+ ASSERT(m_frame->document());
+ ASSERT(m_frame->document()->fetcher());
+
if (m_documentLoader) {
String suboriginHeader = m_documentLoader->response().httpHeaderField(HTTPNames::Suborigin);
if (!suboriginHeader.isNull()) {
@@ -482,9 +492,6 @@ void FrameLoader::didBeginDocument(bool dispatch)
}
}
- if (m_provisionalItem && isBackForwardLoadType(m_loadType))
- m_frame->document()->setStateForNewFormElements(m_provisionalItem->documentState());
-
client()->didCreateNewDocument();
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698