<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168647] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168647">168647</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2014-05-12 14:38:02 -0700 (Mon, 12 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Progress on web timing.
https://bugs.webkit.org/show_bug.cgi?id=132574
Reviewed by Alexey Proskuryakov.
Source/WebCore:
* CMakeLists.txt:
Removed ResourceLoadTiming.cpp.
* WebCore.exp.in:
Added linker symbols for ResourceLoadTiming.
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Removed ResourceLoadTiming.cpp.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming):
* inspector/protocol/Network.json:
Updated ResourceTiming structure.
* loader/DocumentLoadTiming.cpp:
(WebCore::DocumentLoadTiming::setNavigationStart):
* loader/DocumentLoadTiming.h:
Deleted unused setNavigationStart function.
* page/Performance.idl:
Updated spec URL.
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::responseEnd):
Updated ResourceLoadTiming member variable names.
(WebCore::PerformanceResourceTiming::responseStart):
* page/PerformanceResourceTiming.h:
* page/PerformanceResourceTiming.idl:
Deleted responseStart because it is not in the spec.
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
Updated ResourceLoadTiming member variable names.
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
Use navigationStart as base for resource load times.
* page/PerformanceTiming.idl:
Updated spec URL.
* platform/network/HTTPParsers.h:
Removed unused class declarations.
* platform/network/ResourceHandle.h:
Moved soup request time from ResourceLoadTiming to ResourceHandle.
* platform/network/ResourceLoadTiming.cpp: Removed.
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::deepCopy):
(WebCore::ResourceLoadTiming::operator==):
(WebCore::ResourceLoadTiming::ResourceLoadTiming):
Updated ResourceLoadTiming member variable names.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
Collect timing data.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Save timing data to a ResourceLoadTiming on the ResourceResponse.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::restartedCallback):
(WebCore::milisecondsSinceRequest):
(WebCore::ResourceHandle::didStartRequest):
(WebCore::networkEventCallback):
(WebCore::createSoupMessageForHandleAndRequest):
(WebCore::ResourceHandle::sendPendingRequest):
Updated ResourceLoadTiming member variable names.
(WebCore::wroteBodyCallback): Deleted.
Source/WebKit2:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Transfer ResourceLoadTiming values if they exist.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorResourceAgentcpp">trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorprotocolNetworkjson">trunk/Source/WebCore/inspector/protocol/Network.json</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadTimingcpp">trunk/Source/WebCore/loader/DocumentLoadTiming.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadTimingh">trunk/Source/WebCore/loader/DocumentLoadTiming.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceidl">trunk/Source/WebCore/page/Performance.idl</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceResourceTimingcpp">trunk/Source/WebCore/page/PerformanceResourceTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceResourceTimingh">trunk/Source/WebCore/page/PerformanceResourceTiming.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceResourceTimingidl">trunk/Source/WebCore/page/PerformanceResourceTiming.idl</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceTimingcpp">trunk/Source/WebCore/page/PerformanceTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceTimingidl">trunk/Source/WebCore/page/PerformanceTiming.idl</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPParsersh">trunk/Source/WebCore/platform/network/HTTPParsers.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleh">trunk/Source/WebCore/platform/network/ResourceHandle.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceLoadTimingh">trunk/Source/WebCore/platform/network/ResourceLoadTiming.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm">trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceHandleSoupcpp">trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceLoadTimingcpp">trunk/Source/WebCore/platform/network/ResourceLoadTiming.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -2193,7 +2193,6 @@
</span><span class="cx"> platform/network/ResourceErrorBase.cpp
</span><span class="cx"> platform/network/ResourceHandle.cpp
</span><span class="cx"> platform/network/ResourceHandleClient.cpp
</span><del>- platform/network/ResourceLoadTiming.cpp
</del><span class="cx"> platform/network/ResourceRequestBase.cpp
</span><span class="cx"> platform/network/ResourceResponseBase.cpp
</span><span class="cx"> platform/network/SocketStreamHandleBase.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/ChangeLog        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2014-05-12 Alex Christensen <achristensen@webkit.org>
+
+ Progress on web timing.
+ https://bugs.webkit.org/show_bug.cgi?id=132574
+
+ Reviewed by Alexey Proskuryakov.
+
+ * CMakeLists.txt:
+ Removed ResourceLoadTiming.cpp.
+ * WebCore.exp.in:
+ Added linker symbols for ResourceLoadTiming.
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ Removed ResourceLoadTiming.cpp.
+ * inspector/InspectorResourceAgent.cpp:
+ (WebCore::buildObjectForTiming):
+ * inspector/protocol/Network.json:
+ Updated ResourceTiming structure.
+ * loader/DocumentLoadTiming.cpp:
+ (WebCore::DocumentLoadTiming::setNavigationStart):
+ * loader/DocumentLoadTiming.h:
+ Deleted unused setNavigationStart function.
+ * page/Performance.idl:
+ Updated spec URL.
+ * page/PerformanceResourceTiming.cpp:
+ (WebCore::PerformanceResourceTiming::domainLookupStart):
+ (WebCore::PerformanceResourceTiming::domainLookupEnd):
+ (WebCore::PerformanceResourceTiming::connectStart):
+ (WebCore::PerformanceResourceTiming::secureConnectionStart):
+ (WebCore::PerformanceResourceTiming::responseEnd):
+ Updated ResourceLoadTiming member variable names.
+ (WebCore::PerformanceResourceTiming::responseStart):
+ * page/PerformanceResourceTiming.h:
+ * page/PerformanceResourceTiming.idl:
+ Deleted responseStart because it is not in the spec.
+ * page/PerformanceTiming.cpp:
+ (WebCore::PerformanceTiming::domainLookupStart):
+ (WebCore::PerformanceTiming::domainLookupEnd):
+ (WebCore::PerformanceTiming::connectStart):
+ (WebCore::PerformanceTiming::secureConnectionStart):
+ (WebCore::PerformanceTiming::requestStart):
+ (WebCore::PerformanceTiming::responseStart):
+ Updated ResourceLoadTiming member variable names.
+ (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
+ Use navigationStart as base for resource load times.
+ * page/PerformanceTiming.idl:
+ Updated spec URL.
+ * platform/network/HTTPParsers.h:
+ Removed unused class declarations.
+ * platform/network/ResourceHandle.h:
+ Moved soup request time from ResourceLoadTiming to ResourceHandle.
+ * platform/network/ResourceLoadTiming.cpp: Removed.
+ * platform/network/ResourceLoadTiming.h:
+ (WebCore::ResourceLoadTiming::deepCopy):
+ (WebCore::ResourceLoadTiming::operator==):
+ (WebCore::ResourceLoadTiming::ResourceLoadTiming):
+ Updated ResourceLoadTiming member variable names.
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::createNSURLConnection):
+ Collect timing data.
+ * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
+ * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+ (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
+ Save timing data to a ResourceLoadTiming on the ResourceResponse.
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::gotHeadersCallback):
+ (WebCore::restartedCallback):
+ (WebCore::milisecondsSinceRequest):
+ (WebCore::ResourceHandle::didStartRequest):
+ (WebCore::networkEventCallback):
+ (WebCore::createSoupMessageForHandleAndRequest):
+ (WebCore::ResourceHandle::sendPendingRequest):
+ Updated ResourceLoadTiming member variable names.
+ (WebCore::wroteBodyCallback): Deleted.
+
</ins><span class="cx"> 2014-05-12 Dirk Schulze <krit@webkit.org>
</span><span class="cx">
</span><span class="cx"> SVG outline property is broken and inefficient
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -3349,3 +3349,8 @@
</span><span class="cx"> #if ENABLE(VIEW_MODE_CSS_MEDIA)
</span><span class="cx"> __ZN7WebCore4Page11setViewModeENS0_8ViewModeE
</span><span class="cx"> #endif
</span><ins>+
+#if ENABLE(WEB_TIMING)
+__ZN7WebCore20ResourceResponseBase21setResourceLoadTimingEN3WTF10PassRefPtrINS_18ResourceLoadTimingEEE
+__ZNK7WebCore20ResourceResponseBase18resourceLoadTimingEv
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -8416,7 +8416,6 @@
</span><span class="cx"> <ClCompile Include="..\platform\network\ResourceErrorBase.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\network\ResourceHandle.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\network\ResourceHandleClient.cpp" />
</span><del>- <ClCompile Include="..\platform\network\ResourceLoadTiming.cpp" />
</del><span class="cx"> <ClCompile Include="..\platform\network\ResourceRequestBase.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\network\ResourceResponseBase.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\network\SocketStreamErrorBase.cpp" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -1821,9 +1821,6 @@
</span><span class="cx"> <ClCompile Include="..\platform\network\ResourceHandleClient.cpp">
</span><span class="cx"> <Filter>platform\network</Filter>
</span><span class="cx"> </ClCompile>
</span><del>- <ClCompile Include="..\platform\network\ResourceLoadTiming.cpp">
- <Filter>platform\network</Filter>
- </ClCompile>
</del><span class="cx"> <ClCompile Include="..\platform\network\ResourceRequestBase.cpp">
</span><span class="cx"> <Filter>platform\network</Filter>
</span><span class="cx"> </ClCompile>
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -2983,7 +2983,6 @@
</span><span class="cx">                 85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; };
</span><span class="cx">                 85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; };
</span><span class="cx">                 861C2EA413FB4FDD00062ABB /* DocumentLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */; };
</span><del>-                861C2EA613FB4FFF00062ABB /* ResourceLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */; };
</del><span class="cx">                 862F129E18C1576F005C54AF /* CountedUserActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 862F129D18C1572C005C54AF /* CountedUserActivity.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 862F12A018C1DD02005C54AF /* HysteresisActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 862F129F18C1DCE4005C54AF /* HysteresisActivity.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 86512EDE154A2AEF00A90426 /* PerformanceResourceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */; };
</span><span class="lines">@@ -9999,7 +9998,6 @@
</span><span class="cx">                 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEvent.h; sourceTree = "<group>"; };
</span><span class="cx">                 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = "<group>"; };
</span><span class="cx">                 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoadTiming.cpp; sourceTree = "<group>"; };
</span><del>-                861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadTiming.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 862F129D18C1572C005C54AF /* CountedUserActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountedUserActivity.h; sourceTree = "<group>"; };
</span><span class="cx">                 862F129F18C1DCE4005C54AF /* HysteresisActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HysteresisActivity.h; sourceTree = "<group>"; };
</span><span class="cx">                 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceResourceTiming.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -16122,7 +16120,6 @@
</span><span class="cx">                                 514C76660CE923A1007EF3CD /* ResourceHandleInternal.h */,
</span><span class="cx">                                 51E4143216A6595100C633C7 /* ResourceHandleTypes.h */,
</span><span class="cx">                                 E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */,
</span><del>-                                861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */,
</del><span class="cx">                                 8A81BF8411DCFD9000DA2B98 /* ResourceLoadTiming.h */,
</span><span class="cx">                                 514C76670CE923A1007EF3CD /* ResourceRequestBase.cpp */,
</span><span class="cx">                                 514C76680CE923A1007EF3CD /* ResourceRequestBase.h */,
</span><span class="lines">@@ -28856,7 +28853,6 @@
</span><span class="cx">                                 51AA3F6F0BD5AA9E00892971 /* ResourceLoaderMac.mm in Sources */,
</span><span class="cx">                                 973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
</span><span class="cx">                                 D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
</span><del>-                                861C2EA613FB4FFF00062ABB /* ResourceLoadTiming.cpp in Sources */,
</del><span class="cx">                                 514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
</span><span class="cx">                                 7EE6846E12D26E3800E79415 /* ResourceRequestCFNet.cpp in Sources */,
</span><span class="cx">                                 514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorResourceAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -203,18 +203,14 @@
</span><span class="cx"> static PassRefPtr<Inspector::TypeBuilder::Network::ResourceTiming> buildObjectForTiming(const ResourceLoadTiming& timing, DocumentLoader* loader)
</span><span class="cx"> {
</span><span class="cx"> return Inspector::TypeBuilder::Network::ResourceTiming::create()
</span><del>- .setRequestTime(loader->timing()->monotonicTimeToPseudoWallTime(timing.convertResourceLoadTimeToMonotonicTime(0)))
- .setProxyStart(timing.proxyStart)
- .setProxyEnd(timing.proxyEnd)
- .setDnsStart(timing.dnsStart)
- .setDnsEnd(timing.dnsEnd)
</del><ins>+ .setNavigationStart(loader->timing()->navigationStart())
+ .setDomainLookupStart(timing.domainLookupStart)
+ .setDomainLookupEnd(timing.domainLookupEnd)
</ins><span class="cx"> .setConnectStart(timing.connectStart)
</span><span class="cx"> .setConnectEnd(timing.connectEnd)
</span><del>- .setSslStart(timing.sslStart)
- .setSslEnd(timing.sslEnd)
- .setSendStart(timing.sendStart)
- .setSendEnd(timing.sendEnd)
- .setReceiveHeadersEnd(timing.receiveHeadersEnd)
</del><ins>+ .setSecureConnectionStart(timing.secureConnectionStart)
+ .setRequestStart(timing.requestStart)
+ .setResponseStart(timing.responseStart)
</ins><span class="cx"> .release();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorprotocolNetworkjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/protocol/Network.json (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/protocol/Network.json        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/inspector/protocol/Network.json        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -32,18 +32,14 @@
</span><span class="cx"> "type": "object",
</span><span class="cx"> "description": "Timing information for the request.",
</span><span class="cx"> "properties": [
</span><del>- { "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." },
- { "name": "proxyStart", "type": "number", "description": "Started resolving proxy." },
- { "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." },
- { "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." },
- { "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." },
</del><ins>+ { "name": "navigationStart", "type": "number", "description": "Timing's navigationStart is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this navigationStart." },
+ { "name": "domainLookupStart", "type": "number", "description": "Started DNS address resolve." },
+ { "name": "domainLookupEnd", "type": "number", "description": "Finished DNS address resolve." },
</ins><span class="cx"> { "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." },
</span><span class="cx"> { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." },
</span><del>- { "name": "sslStart", "type": "number", "description": "Started SSL handshake." },
- { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." },
- { "name": "sendStart", "type": "number", "description": "Started sending request." },
- { "name": "sendEnd", "type": "number", "description": "Finished sending request." },
- { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." }
</del><ins>+ { "name": "secureConnectionStart", "type": "number", "description": "Started SSL handshake." },
+ { "name": "requestStart", "type": "number", "description": "Started sending request." },
+ { "name": "responseStart", "type": "number", "description": "Started receiving response headers." }
</ins><span class="cx"> ]
</span><span class="cx"> },
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoadTiming.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoadTiming.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/loader/DocumentLoadTiming.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -76,12 +76,6 @@
</span><span class="cx"> m_referenceWallTime = currentTime();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DocumentLoadTiming::setNavigationStart(double navigationStart)
-{
- ASSERT(m_referenceMonotonicTime && m_referenceWallTime);
- m_navigationStart = navigationStart;
-}
-
</del><span class="cx"> void DocumentLoadTiming::addRedirect(const URL& redirectingUrl, const URL& redirectedUrl)
</span><span class="cx"> {
</span><span class="cx"> m_redirectCount++;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoadTiming.h (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoadTiming.h        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/loader/DocumentLoadTiming.h        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> double monotonicTimeToPseudoWallTime(double) const;
</span><span class="cx">
</span><span class="cx"> void markNavigationStart();
</span><del>- void setNavigationStart(double);
</del><span class="cx"> void addRedirect(const URL& redirectingUrl, const URL& redirectedUrl);
</span><span class="cx">
</span><span class="cx"> void markUnloadEventStart() { m_unloadEventStart = monotonicallyIncreasingTime(); }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.idl (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.idl        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/page/Performance.idl        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-// See: http://dev.w3.org/2006/webapi/WebTiming/
</del><ins>+// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
</ins><span class="cx"> [
</span><span class="cx"> Conditional=WEB_TIMING,
</span><span class="cx"> EventTarget,
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -120,10 +120,10 @@
</span><span class="cx"> if (!m_shouldReportDetails)
</span><span class="cx"> return 0.0;
</span><span class="cx">
</span><del>- if (!m_timing || m_timing->dnsStart < 0)
</del><ins>+ if (!m_timing || m_timing->domainLookupStart < 0)
</ins><span class="cx"> return fetchStart();
</span><span class="cx">
</span><del>- return resourceTimeToDocumentMilliseconds(m_timing->dnsStart);
</del><ins>+ return resourceTimeToDocumentMilliseconds(m_timing->domainLookupStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double PerformanceResourceTiming::domainLookupEnd() const
</span><span class="lines">@@ -131,10 +131,10 @@
</span><span class="cx"> if (!m_shouldReportDetails)
</span><span class="cx"> return 0.0;
</span><span class="cx">
</span><del>- if (!m_timing || m_timing->dnsEnd < 0)
</del><ins>+ if (!m_timing || m_timing->domainLookupEnd < 0)
</ins><span class="cx"> return domainLookupStart();
</span><span class="cx">
</span><del>- return resourceTimeToDocumentMilliseconds(m_timing->dnsEnd);
</del><ins>+ return resourceTimeToDocumentMilliseconds(m_timing->domainLookupEnd);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double PerformanceResourceTiming::connectStart() const
</span><span class="lines">@@ -148,8 +148,8 @@
</span><span class="cx">
</span><span class="cx"> // connectStart includes any DNS time, so we may need to trim that off.
</span><span class="cx"> int connectStart = m_timing->connectStart;
</span><del>- if (m_timing->dnsEnd >= 0)
- connectStart = m_timing->dnsEnd;
</del><ins>+ if (m_timing->domainLookupEnd >= 0)
+ connectStart = m_timing->domainLookupEnd;
</ins><span class="cx">
</span><span class="cx"> return resourceTimeToDocumentMilliseconds(connectStart);
</span><span class="cx"> }
</span><span class="lines">@@ -171,10 +171,10 @@
</span><span class="cx"> if (!m_shouldReportDetails)
</span><span class="cx"> return 0.0;
</span><span class="cx">
</span><del>- if (!m_timing || m_timing->sslStart < 0) // Secure connection not negotiated.
</del><ins>+ if (!m_timing || m_timing->secureConnectionStart < 0) // Secure connection not negotiated.
</ins><span class="cx"> return 0.0;
</span><span class="cx">
</span><del>- return resourceTimeToDocumentMilliseconds(m_timing->sslStart);
</del><ins>+ return resourceTimeToDocumentMilliseconds(m_timing->secureConnectionStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double PerformanceResourceTiming::requestStart() const
</span><span class="lines">@@ -185,25 +185,11 @@
</span><span class="cx"> if (!m_timing)
</span><span class="cx"> return connectEnd();
</span><span class="cx">
</span><del>- return resourceTimeToDocumentMilliseconds(m_timing->sendStart);
</del><ins>+ return resourceTimeToDocumentMilliseconds(m_timing->requestStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-double PerformanceResourceTiming::responseStart() const
-{
- if (!m_shouldReportDetails)
- return 0.0;
-
- if (!m_timing)
- return requestStart();
- // FIXME: This number isn't exactly correct. See the notes in PerformanceTiming::responseStart().
- return resourceTimeToDocumentMilliseconds(m_timing->receiveHeadersEnd);
-}
-
</del><span class="cx"> double PerformanceResourceTiming::responseEnd() const
</span><span class="cx"> {
</span><del>- if (!m_finishTime)
- return responseStart();
-
</del><span class="cx"> return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_finishTime);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -211,7 +197,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!deltaMilliseconds)
</span><span class="cx"> return 0.0;
</span><del>- return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_timing->requestTime) + deltaMilliseconds;
</del><ins>+ return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_requestingDocument.get()->loader()->timing()->navigationStart()) + deltaMilliseconds;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.h (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.h        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.h        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -65,7 +65,6 @@
</span><span class="cx"> double connectEnd() const;
</span><span class="cx"> double secureConnectionStart() const;
</span><span class="cx"> double requestStart() const;
</span><del>- double responseStart() const;
</del><span class="cx"> double responseEnd() const;
</span><span class="cx">
</span><span class="cx"> virtual bool isResource() { return true; }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.idl (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.idl        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.idl        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -43,6 +43,5 @@
</span><span class="cx"> readonly attribute unrestricted double connectEnd;
</span><span class="cx"> readonly attribute unrestricted double secureConnectionStart;
</span><span class="cx"> readonly attribute unrestricted double requestStart;
</span><del>- readonly attribute unrestricted double responseStart;
</del><span class="cx"> readonly attribute unrestricted double responseEnd;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/page/PerformanceTiming.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -130,11 +130,11 @@
</span><span class="cx">
</span><span class="cx"> // This will be -1 when a DNS request is not performed.
</span><span class="cx"> // Rather than exposing a special value that indicates no DNS, we "backfill" with fetchStart.
</span><del>- int dnsStart = timing->dnsStart;
- if (dnsStart < 0)
</del><ins>+ int domainLookupStart = timing->domainLookupStart;
+ if (domainLookupStart < 0)
</ins><span class="cx"> return fetchStart();
</span><span class="cx">
</span><del>- return resourceLoadTimeRelativeToAbsolute(dnsStart);
</del><ins>+ return resourceLoadTimeRelativeToAbsolute(domainLookupStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long PerformanceTiming::domainLookupEnd() const
</span><span class="lines">@@ -145,11 +145,11 @@
</span><span class="cx">
</span><span class="cx"> // This will be -1 when a DNS request is not performed.
</span><span class="cx"> // Rather than exposing a special value that indicates no DNS, we "backfill" with domainLookupStart.
</span><del>- int dnsEnd = timing->dnsEnd;
- if (dnsEnd < 0)
</del><ins>+ int domainLookupEnd = timing->domainLookupEnd;
+ if (domainLookupEnd < 0)
</ins><span class="cx"> return domainLookupStart();
</span><span class="cx">
</span><del>- return resourceLoadTimeRelativeToAbsolute(dnsEnd);
</del><ins>+ return resourceLoadTimeRelativeToAbsolute(domainLookupEnd);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long PerformanceTiming::connectStart() const
</span><span class="lines">@@ -170,8 +170,8 @@
</span><span class="cx">
</span><span class="cx"> // ResourceLoadTiming's connect phase includes DNS, however Navigation Timing's
</span><span class="cx"> // connect phase should not. So if there is DNS time, trim it from the start.
</span><del>- if (timing->dnsEnd >= 0 && timing->dnsEnd > connectStart)
- connectStart = timing->dnsEnd;
</del><ins>+ if (timing->domainLookupEnd >= 0 && timing->domainLookupEnd > connectStart)
+ connectStart = timing->domainLookupEnd;
</ins><span class="cx">
</span><span class="cx"> return resourceLoadTimeRelativeToAbsolute(connectStart);
</span><span class="cx"> }
</span><span class="lines">@@ -205,11 +205,11 @@
</span><span class="cx"> if (!timing)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- int sslStart = timing->sslStart;
- if (sslStart < 0)
</del><ins>+ int secureConnectionStart = timing->secureConnectionStart;
+ if (secureConnectionStart < 0)
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><del>- return resourceLoadTimeRelativeToAbsolute(sslStart);
</del><ins>+ return resourceLoadTimeRelativeToAbsolute(secureConnectionStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long PerformanceTiming::requestStart() const
</span><span class="lines">@@ -218,8 +218,8 @@
</span><span class="cx"> if (!timing)
</span><span class="cx"> return connectEnd();
</span><span class="cx">
</span><del>- ASSERT(timing->sendStart >= 0);
- return resourceLoadTimeRelativeToAbsolute(timing->sendStart);
</del><ins>+ ASSERT(timing->requestStart >= 0);
+ return resourceLoadTimeRelativeToAbsolute(timing->requestStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long PerformanceTiming::responseStart() const
</span><span class="lines">@@ -228,14 +228,8 @@
</span><span class="cx"> if (!timing)
</span><span class="cx"> return requestStart();
</span><span class="cx">
</span><del>- // FIXME: Response start needs to be the time of the first received byte.
- // However, the ResourceLoadTiming API currently only supports the time
- // the last header byte was received. For many responses with reasonable
- // sized cookies, the HTTP headers fit into a single packet so this time
- // is basically equivalent. But for some responses, particularly those with
- // headers larger than a single packet, this time will be too late.
- ASSERT(timing->receiveHeadersEnd >= 0);
- return resourceLoadTimeRelativeToAbsolute(timing->receiveHeadersEnd);
</del><ins>+ ASSERT(timing->responseStart >= 0);
+ return resourceLoadTimeRelativeToAbsolute(timing->responseStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long PerformanceTiming::responseEnd() const
</span><span class="lines">@@ -351,9 +345,7 @@
</span><span class="cx"> unsigned long long PerformanceTiming::resourceLoadTimeRelativeToAbsolute(int relativeMilliseconds) const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(relativeMilliseconds >= 0);
</span><del>- ResourceLoadTiming* resourceTiming = resourceLoadTiming();
- ASSERT(resourceTiming);
- return monotonicTimeToIntegerMilliseconds(resourceTiming->convertResourceLoadTimeToMonotonicTime(relativeMilliseconds));
</del><ins>+ return navigationStart() + relativeMilliseconds;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long PerformanceTiming::monotonicTimeToIntegerMilliseconds(double monotonicSeconds) const
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.idl (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.idl        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/page/PerformanceTiming.idl        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-// See: http://dev.w3.org/2006/webapi/WebTiming/
</del><ins>+// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
</ins><span class="cx"> [
</span><span class="cx"> Conditional=WEB_TIMING,
</span><span class="cx"> ] interface PerformanceTiming {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPParsersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/HTTPParsers.h (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPParsers.h        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.h        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -37,9 +37,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class HTTPHeaderMap;
-class ResourceResponseBase;
-
</del><span class="cx"> enum ContentDispositionType {
</span><span class="cx"> ContentDispositionNone,
</span><span class="cx"> ContentDispositionInline,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandle.h        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -190,6 +190,7 @@
</span><span class="cx"> static void setHostAllowsAnyHTTPSCertificate(const String&);
</span><span class="cx"> static void setClientCertificate(const String& host, GTlsCertificate*);
</span><span class="cx"> static void setIgnoreSSLErrors(bool);
</span><ins>+ double m_requestTime;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // Used to work around the fact that you don't get any more NSURLConnection callbacks until you return from the one you're in.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceLoadTimingcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/network/ResourceLoadTiming.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceLoadTiming.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/ResourceLoadTiming.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ResourceLoadTiming.h"
-
-namespace WebCore {
-
-double ResourceLoadTiming::convertResourceLoadTimeToMonotonicTime(int deltaMilliseconds) const
-{
- return requestTime + deltaMilliseconds / 1000.0;
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceLoadTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceLoadTiming.h (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceLoadTiming.h        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/ResourceLoadTiming.h        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -44,76 +44,50 @@
</span><span class="cx"> PassRefPtr<ResourceLoadTiming> deepCopy()
</span><span class="cx"> {
</span><span class="cx"> RefPtr<ResourceLoadTiming> timing = create();
</span><del>- timing->requestTime = requestTime;
- timing->proxyStart = proxyStart;
- timing->proxyEnd = proxyEnd;
- timing->dnsStart = dnsStart;
- timing->dnsEnd = dnsEnd;
</del><ins>+ timing->domainLookupStart = domainLookupStart;
+ timing->domainLookupEnd = domainLookupEnd;
</ins><span class="cx"> timing->connectStart = connectStart;
</span><span class="cx"> timing->connectEnd = connectEnd;
</span><del>- timing->sendStart = sendStart;
- timing->sendEnd = sendEnd;
- timing->receiveHeadersEnd = receiveHeadersEnd;
- timing->sslStart = sslStart;
- timing->sslEnd = sslEnd;
</del><ins>+ timing->requestStart = requestStart;
+ timing->responseStart = responseStart;
+ timing->secureConnectionStart = secureConnectionStart;
</ins><span class="cx"> return timing.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool operator==(const ResourceLoadTiming& other) const
</span><span class="cx"> {
</span><del>- return requestTime == other.requestTime
- && proxyStart == other.proxyStart
- && proxyEnd == other.proxyEnd
- && dnsStart == other.dnsStart
- && dnsEnd == other.dnsEnd
</del><ins>+ return domainLookupStart == other.domainLookupStart
+ && domainLookupEnd == other.domainLookupEnd
</ins><span class="cx"> && connectStart == other.connectStart
</span><span class="cx"> && connectEnd == other.connectEnd
</span><del>- && sendStart == other.sendStart
- && sendEnd == other.sendEnd
- && receiveHeadersEnd == other.receiveHeadersEnd
- && sslStart == other.sslStart
- && sslEnd == other.sslEnd;
</del><ins>+ && requestStart == other.requestStart
+ && responseStart == other.responseStart
+ && secureConnectionStart == other.secureConnectionStart;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool operator!=(const ResourceLoadTiming& other) const
</span><span class="cx"> {
</span><span class="cx"> return !(*this == other);
</span><span class="cx"> }
</span><del>-
- // We want to present a unified timeline to Javascript. Using walltime is problematic, because the clock may skew while resources
- // load. To prevent that skew, we record a single reference walltime when root document navigation begins. All other times are
- // recorded using monotonicallyIncreasingTime(). When a time needs to be presented to Javascript, we build a pseudo-walltime
- // using the following equation:
- // pseudo time = document wall reference + (resource request time - document monotonic reference) + deltaMilliseconds / 1000.0.
- double convertResourceLoadTimeToMonotonicTime(int deltaMilliseconds) const;
-
- double requestTime; // monotonicallyIncreasingTime() when the port started handling this request.
- int proxyStart; // The rest of these are millisecond deltas, using monotonicallyIncreasingTime(), from requestTime.
- int proxyEnd;
- int dnsStart;
- int dnsEnd;
</del><ins>+
+ // These are millisecond deltas from the navigation start.
+ int domainLookupStart;
+ int domainLookupEnd;
</ins><span class="cx"> int connectStart;
</span><span class="cx"> int connectEnd;
</span><del>- int sendStart;
- int sendEnd;
- int receiveHeadersEnd;
- int sslStart;
- int sslEnd;
-
</del><ins>+ int requestStart;
+ int responseStart;
+ int secureConnectionStart;
+
</ins><span class="cx"> private:
</span><span class="cx"> ResourceLoadTiming()
</span><del>- : requestTime(0)
- , proxyStart(-1)
- , proxyEnd(-1)
- , dnsStart(-1)
- , dnsEnd(-1)
</del><ins>+ : domainLookupStart(-1)
+ , domainLookupEnd(-1)
</ins><span class="cx"> , connectStart(-1)
</span><span class="cx"> , connectEnd(-1)
</span><del>- , sendStart(0)
- , sendEnd(0)
- , receiveHeadersEnd(0)
- , sslStart(-1)
- , sslEnd(-1)
</del><ins>+ , requestStart(0)
+ , responseStart(0)
+ , secureConnectionStart(-1)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -56,6 +56,14 @@
</span><span class="cx"> #import <wtf/text/Base64.h>
</span><span class="cx"> #import <wtf/text/CString.h>
</span><span class="cx">
</span><ins>+#if __has_include(<Foundation/NSURLConnectionPrivate.h>)
+#import <Foundation/NSURLConnectionPrivate.h>
+#else
+@interface NSURLConnection (TimingData)
++ (void)_setCollectsTimingData:(BOOL)collect;
+@end
+#endif
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #import <CFNetwork/CFURLRequest.h>
</span><span class="cx">
</span><span class="lines">@@ -200,6 +208,9 @@
</span><span class="cx"> const bool usesCache = true;
</span><span class="cx"> #endif
</span><span class="cx"> d->m_connection = adoptNS([[NSURLConnection alloc] _initWithRequest:nsRequest delegate:delegate usesCache:usesCache maxContentLength:0 startImmediately:NO connectionProperties:propertyDictionary]);
</span><ins>+#if ENABLE(WEB_TIMING)
+ [NSURLConnection _setCollectsTimingData:YES];
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ResourceHandle::start()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -38,6 +38,14 @@
</span><span class="cx"> #import "SharedBuffer.h"
</span><span class="cx"> #import "WebCoreURLResponse.h"
</span><span class="cx">
</span><ins>+#if __has_include(<CFNetwork/CFNSURLConnection.h>)
+#import <CFNetwork/CFNSURLConnection.h>
+#else
+@interface NSURLConnection (TimingData)
+- (NSDictionary *)_timingData;
+@end
+#endif
+
</ins><span class="cx"> @interface NSURLRequest (Details)
</span><span class="cx"> - (id)_propertyForKey:(NSString *)key;
</span><span class="cx"> @end
</span><span class="lines">@@ -169,8 +177,40 @@
</span><span class="cx"> if (m_handle->quickLookHandle())
</span><span class="cx"> r = m_handle->quickLookHandle()->nsResponse();
</span><span class="cx"> #endif
</span><del>-
- m_handle->client()->didReceiveResponse(m_handle, r);
</del><ins>+
+ ResourceResponse resourceResponse(r);
+#if ENABLE(WEB_TIMING)
+ if (NSDictionary *timingData = [connection _timingData]) {
+ resourceResponse.setResourceLoadTiming(ResourceLoadTiming::create());
+ ResourceLoadTiming* timing = resourceResponse.resourceLoadTiming();
+
+ // This is not the navigationStart time in monotonic time, but the other times are relative to this time
+ // and only the differences between times are stored.
+ double referenceStart = [[timingData valueForKey:@"_kCFNTimingDataTimingDataInit"] doubleValue];
+
+ double domainLookupStart = [[timingData valueForKey:@"_kCFNTimingDataDomainLookupStart"] doubleValue];
+ double domainLookupEnd = [[timingData valueForKey:@"_kCFNTimingDataDomainLookupEnd"] doubleValue];
+ double connectStart = [[timingData valueForKey:@"_kCFNTimingDataConnectStart"] doubleValue];
+ double secureConnectionStart = [[timingData valueForKey:@"_kCFNTimingDataSecureConnectionStart"] doubleValue];
+ double connectEnd = [[timingData valueForKey:@"_kCFNTimingDataConnectEnd"] doubleValue];
+ double requestStart = [[timingData valueForKey:@"_kCFNTimingDataRequestStart"] doubleValue];
+ double responseStart = [[timingData valueForKey:@"_kCFNTimingDataResponseStart"] doubleValue];
+
+ if (timing) {
+ timing->domainLookupStart = domainLookupStart <= 0.0 ? -1 : (domainLookupStart - referenceStart) * 1000;
+ timing->domainLookupEnd = domainLookupEnd <= 0.0 ? -1 : (domainLookupEnd - referenceStart) * 1000;
+ timing->connectStart = connectStart <= 0.0 ? -1 : (connectStart - referenceStart) * 1000;
+ timing->secureConnectionStart = secureConnectionStart <= 0.0 ? -1 : (secureConnectionStart - referenceStart) * 1000;
+ timing->connectEnd = connectEnd <= 0.0 ? -1 : (connectEnd - referenceStart) * 1000;
+ timing->requestStart = requestStart <= 0.0 ? -1 : (requestStart - referenceStart) * 1000;
+ timing->responseStart = responseStart <= 0.0 ? -1 : (responseStart - referenceStart) * 1000;
+ }
+ }
+#else
+ UNUSED_PARAM(connection);
+#endif
+
+ m_handle->client()->didReceiveResponse(m_handle, resourceResponse);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -39,6 +39,14 @@
</span><span class="cx"> #import "WebCoreURLResponse.h"
</span><span class="cx"> #import <wtf/MainThread.h>
</span><span class="cx">
</span><ins>+#if __has_include(<CFNetwork/CFNSURLConnection.h>)
+#import <CFNetwork/CFNSURLConnection.h>
+#else
+@interface NSURLConnection (TimingData)
+- (NSDictionary *)_timingData;
+@end
+#endif
+
</ins><span class="cx"> @interface NSURLRequest (Details)
</span><span class="cx"> - (id)_propertyForKey:(NSString *)key;
</span><span class="cx"> @end
</span><span class="lines">@@ -193,7 +201,6 @@
</span><span class="cx"> - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)r
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!isMainThread());
</span><del>- UNUSED_PARAM(connection);
</del><span class="cx">
</span><span class="cx"> LOG(Network, "Handle %p delegate connection:%p didReceiveResponse:%p (HTTP status %d, reported MIMEType '%s')", m_handle, connection, r, [r respondsToSelector:@selector(statusCode)] ? [(id)r statusCode] : 0, [[r MIMEType] UTF8String]);
</span><span class="cx">
</span><span class="lines">@@ -212,8 +219,39 @@
</span><span class="cx">
</span><span class="cx"> if ([m_handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) _propertyForKey:@"ForceHTMLMIMEType"])
</span><span class="cx"> [r _setMIMEType:@"text/html"];
</span><del>-
- m_handle->client()->didReceiveResponseAsync(m_handle, r);
</del><ins>+
+ ResourceResponse resourceResponse(r);
+#if ENABLE(WEB_TIMING)
+ if (NSDictionary *timingData = [connection _timingData]) {
+ resourceResponse.setResourceLoadTiming(ResourceLoadTiming::create());
+ ResourceLoadTiming* timing = resourceResponse.resourceLoadTiming();
+
+ // This is not the navigationStart time in monotonic time, but the other times are relative to this time
+ // and only the differences between times are stored.
+ double referenceStart = [[timingData valueForKey:@"_kCFNTimingDataTimingDataInit"] doubleValue];
+
+ double domainLookupStart = [[timingData valueForKey:@"_kCFNTimingDataDomainLookupStart"] doubleValue];
+ double domainLookupEnd = [[timingData valueForKey:@"_kCFNTimingDataDomainLookupEnd"] doubleValue];
+ double connectStart = [[timingData valueForKey:@"_kCFNTimingDataConnectStart"] doubleValue];
+ double secureConnectionStart = [[timingData valueForKey:@"_kCFNTimingDataSecureConnectionStart"] doubleValue];
+ double connectEnd = [[timingData valueForKey:@"_kCFNTimingDataConnectEnd"] doubleValue];
+ double requestStart = [[timingData valueForKey:@"_kCFNTimingDataRequestStart"] doubleValue];
+ double responseStart = [[timingData valueForKey:@"_kCFNTimingDataResponseStart"] doubleValue];
+
+ if (timing) {
+ timing->domainLookupStart = domainLookupStart <= 0.0 ? -1 : (domainLookupStart - referenceStart) * 1000;
+ timing->domainLookupEnd = domainLookupEnd <= 0.0 ? -1 : (domainLookupEnd - referenceStart) * 1000;
+ timing->connectStart = connectStart <= 0.0 ? -1 : (connectStart - referenceStart) * 1000;
+ timing->secureConnectionStart = secureConnectionStart <= 0.0 ? -1 : (secureConnectionStart - referenceStart) * 1000;
+ timing->connectEnd = connectEnd <= 0.0 ? -1 : (connectEnd - referenceStart) * 1000;
+ timing->requestStart = requestStart <= 0.0 ? -1 : (requestStart - referenceStart) * 1000;
+ timing->responseStart = responseStart <= 0.0 ? -1 : (responseStart - referenceStart) * 1000;
+ }
+ }
+#else
+ UNUSED_PARAM(connection);
+#endif
+ m_handle->client()->didReceiveResponseAsync(m_handle, resourceResponse);
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceHandleSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -316,11 +316,6 @@
</span><span class="cx">
</span><span class="cx"> ResourceHandleInternal* d = handle->getInternal();
</span><span class="cx">
</span><del>-#if ENABLE(WEB_TIMING)
- if (d->m_response.resourceLoadTiming())
- d->m_response.resourceLoadTiming()->receiveHeadersEnd = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime);
-#endif
-
</del><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> // We are a bit more conservative with the persistent credential storage than the session store,
</span><span class="cx"> // since we are waiting until we know that this authentication succeeded before actually storing.
</span><span class="lines">@@ -390,7 +385,7 @@
</span><span class="cx"> ResourceHandleInternal* d = handle->getInternal();
</span><span class="cx"> ResourceResponse& redirectResponse = d->m_response;
</span><span class="cx"> redirectResponse.setResourceLoadTiming(ResourceLoadTiming::create());
</span><del>- redirectResponse.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime();
</del><ins>+ handle->m_requestTime = monotonicallyIncreasingTime();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -838,35 +833,13 @@
</span><span class="cx"> return static_cast<int>((monotonicallyIncreasingTime() - requestTime) * 1000.0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void wroteBodyCallback(SoupMessage*, gpointer data)
-{
- RefPtr<ResourceHandle> handle = static_cast<ResourceHandle*>(data);
- if (!handle)
- return;
-
- ResourceHandleInternal* d = handle->getInternal();
- if (!d->m_response.resourceLoadTiming())
- return;
-
- d->m_response.resourceLoadTiming()->sendEnd = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime);
-}
-
</del><span class="cx"> void ResourceHandle::didStartRequest()
</span><span class="cx"> {
</span><span class="cx"> ResourceHandleInternal* d = getInternal();
</span><span class="cx"> if (!d->m_response.resourceLoadTiming())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- d->m_response.resourceLoadTiming()->sendStart = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime);
- if (d->m_response.resourceLoadTiming()->sslStart != -1) {
- // WebCore/inspector/front-end/RequestTimingView.js assumes
- // that SSL time is included in connection time so must
- // substract here the SSL delta that will be added later (see
- // WebInspector.RequestTimingView.createTimingTable in the
- // file above for more details).
- d->m_response.resourceLoadTiming()->sendStart -=
- d->m_response.resourceLoadTiming()->sslEnd - d->m_response.resourceLoadTiming()->sslStart;
- }
</del><ins>+ d->m_response.resourceLoadTiming()->requestStart = milisecondsSinceRequest(m_requestTime);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void networkEventCallback(SoupMessage*, GSocketClientEvent event, GIOStream*, gpointer data)
</span><span class="lines">@@ -879,40 +852,38 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ResourceHandleInternal* d = handle->getInternal();
</span><del>- int deltaTime = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime);
</del><ins>+ int deltaTime = milisecondsSinceRequest(handle->m_requestTime);
</ins><span class="cx"> switch (event) {
</span><span class="cx"> case G_SOCKET_CLIENT_RESOLVING:
</span><del>- d->m_response.resourceLoadTiming()->dnsStart = deltaTime;
</del><ins>+ d->m_response.resourceLoadTiming()->domainLookupStart = deltaTime;
</ins><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_RESOLVED:
</span><del>- d->m_response.resourceLoadTiming()->dnsEnd = deltaTime;
</del><ins>+ d->m_response.resourceLoadTiming()->domainLookupEnd = deltaTime;
</ins><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_CONNECTING:
</span><span class="cx"> d->m_response.resourceLoadTiming()->connectStart = deltaTime;
</span><del>- if (d->m_response.resourceLoadTiming()->dnsStart != -1)
</del><ins>+ if (d->m_response.resourceLoadTiming()->domainLookupStart != -1) {
</ins><span class="cx"> // WebCore/inspector/front-end/RequestTimingView.js assumes
</span><span class="cx"> // that DNS time is included in connection time so must
</span><span class="cx"> // substract here the DNS delta that will be added later (see
</span><span class="cx"> // WebInspector.RequestTimingView.createTimingTable in the
</span><span class="cx"> // file above for more details).
</span><span class="cx"> d->m_response.resourceLoadTiming()->connectStart -=
</span><del>- d->m_response.resourceLoadTiming()->dnsEnd - d->m_response.resourceLoadTiming()->dnsStart;
</del><ins>+ d->m_response.resourceLoadTiming()->domainLookupEnd - d->m_response.resourceLoadTiming()->domainLookupStart;
+ }
</ins><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_CONNECTED:
</span><span class="cx"> // Web Timing considers that connection time involves dns, proxy & TLS negotiation...
</span><span class="cx"> // so we better pick G_SOCKET_CLIENT_COMPLETE for connectEnd
</span><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_PROXY_NEGOTIATING:
</span><del>- d->m_response.resourceLoadTiming()->proxyStart = deltaTime;
</del><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_PROXY_NEGOTIATED:
</span><del>- d->m_response.resourceLoadTiming()->proxyEnd = deltaTime;
</del><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_TLS_HANDSHAKING:
</span><del>- d->m_response.resourceLoadTiming()->sslStart = deltaTime;
</del><ins>+ d->m_response.resourceLoadTiming()->secureConnectionStart = deltaTime;
</ins><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_TLS_HANDSHAKED:
</span><del>- d->m_response.resourceLoadTiming()->sslEnd = deltaTime;
</del><span class="cx"> break;
</span><span class="cx"> case G_SOCKET_CLIENT_COMPLETE:
</span><span class="cx"> d->m_response.resourceLoadTiming()->connectEnd = deltaTime;
</span><span class="lines">@@ -974,7 +945,6 @@
</span><span class="cx"> d->m_response.setResourceLoadTiming(ResourceLoadTiming::create());
</span><span class="cx"> g_signal_connect(d->m_soupMessage.get(), "network-event", G_CALLBACK(networkEventCallback), handle);
</span><span class="cx"> g_signal_connect(d->m_soupMessage.get(), "restarted", G_CALLBACK(restartedCallback), handle);
</span><del>- g_signal_connect(d->m_soupMessage.get(), "wrote-body", G_CALLBACK(wroteBodyCallback), handle);
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if SOUP_CHECK_VERSION(2, 43, 1)
</span><span class="lines">@@ -1048,7 +1018,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="cx"> if (d->m_response.resourceLoadTiming())
</span><del>- d->m_response.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime();
</del><ins>+ m_requestTime = monotonicallyIncreasingTime();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (d->m_firstRequest.timeoutInterval() > 0) {
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-05-12 Alex Christensen <achristensen@webkit.org>
+
+ Progress on web timing.
+ https://bugs.webkit.org/show_bug.cgi?id=132574
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Shared/WebCoreArgumentCoders.cpp:
+ (IPC::ArgumentCoder<ResourceResponse>::encode):
+ (IPC::ArgumentCoder<ResourceResponse>::decode):
+ Transfer ResourceLoadTiming values if they exist.
+
</ins><span class="cx"> 2014-05-12 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (168646 => 168647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-05-12 21:34:06 UTC (rev 168646)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-05-12 21:38:02 UTC (rev 168647)
</span><span class="lines">@@ -688,6 +688,21 @@
</span><span class="cx"> encoder << resourceResponse.httpStatusText();
</span><span class="cx"> encoder << resourceResponse.suggestedFilename();
</span><span class="cx"> }
</span><ins>+
+#if ENABLE(WEB_TIMING)
+ ResourceLoadTiming* timing = resourceResponse.resourceLoadTiming();
+ bool hasResourceLoadTiming = timing;
+ encoder << hasResourceLoadTiming;
+ if (hasResourceLoadTiming) {
+ encoder << timing->domainLookupStart;
+ encoder << timing->domainLookupEnd;
+ encoder << timing->connectStart;
+ encoder << timing->connectEnd;
+ encoder << timing->requestStart;
+ encoder << timing->responseStart;
+ encoder << timing->secureConnectionStart;
+ }
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ArgumentCoder<ResourceResponse>::decode(ArgumentDecoder& decoder, ResourceResponse& resourceResponse)
</span><span class="lines">@@ -755,6 +770,24 @@
</span><span class="cx"> return false;
</span><span class="cx"> response.setSuggestedFilename(suggestedFilename);
</span><span class="cx"> }
</span><ins>+
+#if ENABLE(WEB_TIMING)
+ bool hasResourceLoadTiming;
+ if (!decoder.decode(hasResourceLoadTiming))
+ return false;
+ if (hasResourceLoadTiming) {
+ response.setResourceLoadTiming(ResourceLoadTiming::create());
+ ResourceLoadTiming* timing = response.resourceLoadTiming();
+ if (!decoder.decode(timing->domainLookupStart)
+ || !decoder.decode(timing->domainLookupEnd)
+ || !decoder.decode(timing->connectStart)
+ || !decoder.decode(timing->connectEnd)
+ || !decoder.decode(timing->requestStart)
+ || !decoder.decode(timing->responseStart)
+ || !decoder.decode(timing->secureConnectionStart))
+ return false;
+ }
+#endif
</ins><span class="cx">
</span><span class="cx"> resourceResponse = response;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>