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

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

Issue 14054023: Add loadedNonEmptyDocument flag in FrameLoader for Resource Timing (Closed) Base URL: http://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set loadedNonEmptyDocument in setDocumentLoader Created 7 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: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 40d82d4513f1a22c14ae5973694a27ef189ab067..fe21f6db1dca6087fa4fcd2d9b39ccabd12ead98 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -502,7 +502,7 @@ void FrameLoader::didExplicitOpen()
// Calling document.open counts as committing the first real document load.
if (!m_stateMachine.committedFirstRealDocumentLoad())
m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit);
-
+
// Prevent window.open(url) -- eg window.open("about:blank") -- from blowing away results
// from a subsequent window.document.open / window.document.write call.
// Canceling redirection here works for all cases because document.open
@@ -1518,6 +1518,9 @@ void FrameLoader::setDocumentLoader(DocumentLoader* loader)
m_documentLoader->detachFromFrame();
m_documentLoader = loader;
+
+ if(m_frame->ownerElement() && !m_frame->ownerElement()->loadedNonEmptyDocument() && m_documentLoader && !m_documentLoader->requestURL().isBlankURL() && !m_documentLoader-> requestURL().isEmpty())
+ m_frame->ownerElement()->didLoadNonEmptyDocument();
}
void FrameLoader::setPolicyDocumentLoader(DocumentLoader* loader)

Powered by Google App Engine
This is Rietveld 408576698