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

Unified Diff: Source/core/loader/cache/CachedResourceLoader.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 flag in CachedResourceLoader(Resource Timing related code) 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/cache/CachedResourceLoader.cpp
diff --git a/Source/core/loader/cache/CachedResourceLoader.cpp b/Source/core/loader/cache/CachedResourceLoader.cpp
index b9bd310bf98a01fe45e043a9696fd8375fed8a97..0e61a3eb67ea63e012f366b5269923fbeea5c73e 100644
--- a/Source/core/loader/cache/CachedResourceLoader.cpp
+++ b/Source/core/loader/cache/CachedResourceLoader.cpp
@@ -571,9 +571,12 @@ void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedR
{
if (resource->type() == CachedResource::MainResource) {
// <iframe>s should report the initial navigation requested by the parent document, but not subsequent navigations.
- if (frame()->ownerElement() && m_documentLoader->frameLoader()->stateMachine()->committingFirstRealLoad()) {
+ if (frame()->ownerElement() && !frame()->ownerElement()->loadedNonEmptyDocument()) {
InitiatorInfo info = { frame()->ownerElement()->localName(), monotonicallyIncreasingTime() };
m_initiatorMap.add(resource.get(), info);
+
+ if(!frame()->ownerElement()->loadedNonEmptyDocument() && !m_documentLoader->requestURL().isBlankURL() && !m_documentLoader-> requestURL().isEmpty())
Nate Chapin 2013/05/08 16:06:55 I think this if isn't necessary. DocumentLoader sh
+ frame()->ownerElement()->didLoadNonEmptyDocument();
}
} else {
InitiatorInfo info = { request.initiatorName(), monotonicallyIncreasingTime() };
« Source/core/html/HTMLIFrameElement.h ('K') | « Source/core/loader/FrameLoaderStateMachine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698