Only report resource timing to parent frame for the first iframe load
https://bugs.webkit.org/show_bug.cgi?id=190498
<rdar://problem/
44347398>
Reviewed by Youenn Fablet.
Source/WebCore:
Only the first iframe navigation or the first iframe navigation after about:blank should be reported.
https://www.w3.org/TR/resource-timing-2/#resources-included-in-the-performanceresourcetiming-interface
Test: http/tests/misc/resource-timing-navigation-in-restored-iframe.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadWithDocumentLoader):
* loader/FrameLoader.h:
(WebCore::FrameLoader::shouldReportResourceTimingToParentFrame):
(WebCore::FrameLoader::setShouldReportResourceTimingToParentFrame): Deleted.
* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
LayoutTests:
The layout test is from Chromium change:
https://chromium-review.googlesource.com/c/chromium/src/+/1186215.
* http/tests/misc/resource-timing-navigation-in-restored-iframe-expected.txt: Added.
* http/tests/misc/resource-timing-navigation-in-restored-iframe.html: Added.
* http/tests/misc/resources/alert-then-back.html: Added.
* http/tests/misc/resources/navigate-on-message.html: Added.
* http/tests/misc/resources/post-message-to-parent.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237395
268f45cc-cd09-0410-ab3c-
d52691b4dbfc