Web Inspector: More accurate Resource Timing data in Web Inspector
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Mar 2017 18:19:47 +0000 (18:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Mar 2017 18:19:47 +0000 (18:19 +0000)
commitc2c35c2885882cabec1c4cf9b66e085a52a5b3fb
tree1c8c1f2bf747d99d24d36b8b0f9edb948c0c920b
parentcf636e9fe166afe930495027b7eab08e2c20d88f
Web Inspector: More accurate Resource Timing data in Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=169577

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-14
Reviewed by Youenn Fablet.

Source/WebCore:

* inspector/InspectorNetworkAgent.h:
* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::didFinishLoading):
Use the ResourceLoader to get the start time that responseEnd is relative to
so we can send the more accurate responseEnd when available.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didFinishLoading):
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didFinishLoad):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
* loader/ResourceLoadNotifier.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoading):
Pass ResourceLoader through to Web Inspector in didFinishLoading.

* platform/network/cocoa/NetworkLoadMetrics.mm:
(WebCore::copyTimingData):
The differences from the reference start are in Seconds, not milliseconds.

Source/WebInspectorUI:

* UserInterface/Models/ResourceTimingData.js:
(WebInspector.ResourceTimingData.prototype.get requestStart):
(WebInspector.ResourceTimingData.prototype.get responseStart):
Fallback to the startTime if available instead of using the
inaccurate WebContentProcess gathered timestamps.

(WebInspector.ResourceTimingData.prototype.markResponseEndTime):
Verify responseEnd compared to other times we may have.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorNetworkAgent.cpp
Source/WebCore/inspector/InspectorNetworkAgent.h
Source/WebCore/loader/CrossOriginPreflightChecker.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/ResourceLoadNotifier.cpp
Source/WebCore/loader/ResourceLoadNotifier.h
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/ResourceTimingData.js