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

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

Issue 1257953003: Do not report Resource Timing for iframe navigations when restored from history (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test verifies correct entry Created 5 years, 5 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 | « LayoutTests/http/tests/misc/resources/frame-initial-url.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameFetchContext.cpp
diff --git a/Source/core/loader/FrameFetchContext.cpp b/Source/core/loader/FrameFetchContext.cpp
index 34fd9352c511149f23717e83905bf790bbc0693c..6f4e32ed7915b27e8a982d2ebae64beefd4d5f43 100644
--- a/Source/core/loader/FrameFetchContext.cpp
+++ b/Source/core/loader/FrameFetchContext.cpp
@@ -563,8 +563,12 @@ bool FrameFetchContext::updateTimingInfoForIFrameNavigation(ResourceTimingInfo*
// FIXME: Resource timing is broken when the parent is a remote frame.
if (!frame()->deprecatedLocalOwner() || frame()->deprecatedLocalOwner()->loadedNonEmptyDocument())
return false;
- info->setInitiatorType(frame()->deprecatedLocalOwner()->localName());
frame()->deprecatedLocalOwner()->didLoadNonEmptyDocument();
+ // Do not report iframe navigation that restored from history, since its
+ // location may have been changed after initial navigation.
+ if (frame()->loader().loadType() == FrameLoadTypeInitialHistoryLoad)
+ return false;
+ info->setInitiatorType(frame()->deprecatedLocalOwner()->localName());
return true;
}
« no previous file with comments | « LayoutTests/http/tests/misc/resources/frame-initial-url.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698