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

Side by Side 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, 4 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 { 556 {
557 return m_document && m_document->pageDismissalEventBeingDispatched() != Docu ment::NoDismissal; 557 return m_document && m_document->pageDismissalEventBeingDispatched() != Docu ment::NoDismissal;
558 } 558 }
559 559
560 bool FrameFetchContext::updateTimingInfoForIFrameNavigation(ResourceTimingInfo* info) 560 bool FrameFetchContext::updateTimingInfoForIFrameNavigation(ResourceTimingInfo* info)
561 { 561 {
562 // <iframe>s should report the initial navigation requested by the parent do cument, but not subsequent navigations. 562 // <iframe>s should report the initial navigation requested by the parent do cument, but not subsequent navigations.
563 // FIXME: Resource timing is broken when the parent is a remote frame. 563 // FIXME: Resource timing is broken when the parent is a remote frame.
564 if (!frame()->deprecatedLocalOwner() || frame()->deprecatedLocalOwner()->loa dedNonEmptyDocument()) 564 if (!frame()->deprecatedLocalOwner() || frame()->deprecatedLocalOwner()->loa dedNonEmptyDocument())
565 return false; 565 return false;
566 frame()->deprecatedLocalOwner()->didLoadNonEmptyDocument();
567 // Do not report iframe navigation that restored from history, since its
568 // location may have been changed after initial navigation.
569 if (frame()->loader().loadType() == FrameLoadTypeInitialHistoryLoad)
570 return false;
566 info->setInitiatorType(frame()->deprecatedLocalOwner()->localName()); 571 info->setInitiatorType(frame()->deprecatedLocalOwner()->localName());
567 frame()->deprecatedLocalOwner()->didLoadNonEmptyDocument();
568 return true; 572 return true;
569 } 573 }
570 574
571 void FrameFetchContext::sendImagePing(const KURL& url) 575 void FrameFetchContext::sendImagePing(const KURL& url)
572 { 576 {
573 PingLoader::loadImage(frame(), url); 577 PingLoader::loadImage(frame(), url);
574 } 578 }
575 579
576 void FrameFetchContext::addConsoleMessage(const String& message) const 580 void FrameFetchContext::addConsoleMessage(const String& message) const
577 { 581 {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 673 }
670 674
671 DEFINE_TRACE(FrameFetchContext) 675 DEFINE_TRACE(FrameFetchContext)
672 { 676 {
673 visitor->trace(m_document); 677 visitor->trace(m_document);
674 visitor->trace(m_documentLoader); 678 visitor->trace(m_documentLoader);
675 FetchContext::trace(visitor); 679 FetchContext::trace(visitor);
676 } 680 }
677 681
678 } // namespace blink 682 } // namespace blink
OLDNEW
« 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