<!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&lt;ResourceResponse&gt;::encode):
(IPC::ArgumentCoder&lt;ResourceResponse&gt;::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  &lt;achristensen@webkit.org&gt;
+
+        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  &lt;krit@webkit.org&gt;
</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">     &lt;ClCompile Include=&quot;..\platform\network\ResourceErrorBase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceHandle.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceHandleClient.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\network\ResourceLoadTiming.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceRequestBase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceResponseBase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\SocketStreamErrorBase.cpp&quot; /&gt;
</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">     &lt;ClCompile Include=&quot;..\platform\network\ResourceHandleClient.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\network\ResourceLoadTiming.cpp&quot;&gt;
-      &lt;Filter&gt;platform\network&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceRequestBase.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</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 = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoadTiming.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadTiming.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 862F129D18C1572C005C54AF /* CountedUserActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountedUserActivity.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 862F129F18C1DCE4005C54AF /* HysteresisActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HysteresisActivity.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceResourceTiming.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</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&lt;Inspector::TypeBuilder::Network::ResourceTiming&gt; buildObjectForTiming(const ResourceLoadTiming&amp; timing, DocumentLoader* loader)
</span><span class="cx"> {
</span><span class="cx">     return Inspector::TypeBuilder::Network::ResourceTiming::create()
</span><del>-        .setRequestTime(loader-&gt;timing()-&gt;monotonicTimeToPseudoWallTime(timing.convertResourceLoadTimeToMonotonicTime(0)))
-        .setProxyStart(timing.proxyStart)
-        .setProxyEnd(timing.proxyEnd)
-        .setDnsStart(timing.dnsStart)
-        .setDnsEnd(timing.dnsEnd)
</del><ins>+        .setNavigationStart(loader-&gt;timing()-&gt;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">             &quot;type&quot;: &quot;object&quot;,
</span><span class="cx">             &quot;description&quot;: &quot;Timing information for the request.&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><del>-                { &quot;name&quot;: &quot;requestTime&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.&quot; },
-                { &quot;name&quot;: &quot;proxyStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started resolving proxy.&quot; },
-                { &quot;name&quot;: &quot;proxyEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Finished resolving proxy.&quot; },
-                { &quot;name&quot;: &quot;dnsStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started DNS address resolve.&quot; },
-                { &quot;name&quot;: &quot;dnsEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Finished DNS address resolve.&quot; },
</del><ins>+                { &quot;name&quot;: &quot;navigationStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Timing's navigationStart is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this navigationStart.&quot; },
+                { &quot;name&quot;: &quot;domainLookupStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started DNS address resolve.&quot; },
+                { &quot;name&quot;: &quot;domainLookupEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Finished DNS address resolve.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;connectStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started connecting to the remote host.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;connectEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Connected to the remote host.&quot; },
</span><del>-                { &quot;name&quot;: &quot;sslStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started SSL handshake.&quot; },
-                { &quot;name&quot;: &quot;sslEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Finished SSL handshake.&quot; },
-                { &quot;name&quot;: &quot;sendStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started sending request.&quot; },
-                { &quot;name&quot;: &quot;sendEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Finished sending request.&quot; },
-                { &quot;name&quot;: &quot;receiveHeadersEnd&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Finished receiving response headers.&quot; }
</del><ins>+                { &quot;name&quot;: &quot;secureConnectionStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started SSL handshake.&quot; },
+                { &quot;name&quot;: &quot;requestStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started sending request.&quot; },
+                { &quot;name&quot;: &quot;responseStart&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Started receiving response headers.&quot; }
</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 &amp;&amp; m_referenceWallTime);
-    m_navigationStart = navigationStart;
-}
-
</del><span class="cx"> void DocumentLoadTiming::addRedirect(const URL&amp; redirectingUrl, const URL&amp; 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&amp; redirectingUrl, const URL&amp; 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-&gt;dnsStart &lt; 0)
</del><ins>+    if (!m_timing || m_timing-&gt;domainLookupStart &lt; 0)
</ins><span class="cx">         return fetchStart();
</span><span class="cx"> 
</span><del>-    return resourceTimeToDocumentMilliseconds(m_timing-&gt;dnsStart);
</del><ins>+    return resourceTimeToDocumentMilliseconds(m_timing-&gt;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-&gt;dnsEnd &lt; 0)
</del><ins>+    if (!m_timing || m_timing-&gt;domainLookupEnd &lt; 0)
</ins><span class="cx">         return domainLookupStart();
</span><span class="cx"> 
</span><del>-    return resourceTimeToDocumentMilliseconds(m_timing-&gt;dnsEnd);
</del><ins>+    return resourceTimeToDocumentMilliseconds(m_timing-&gt;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-&gt;connectStart;
</span><del>-    if (m_timing-&gt;dnsEnd &gt;= 0)
-        connectStart = m_timing-&gt;dnsEnd;
</del><ins>+    if (m_timing-&gt;domainLookupEnd &gt;= 0)
+        connectStart = m_timing-&gt;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-&gt;sslStart &lt; 0) // Secure connection not negotiated.
</del><ins>+    if (!m_timing || m_timing-&gt;secureConnectionStart &lt; 0) // Secure connection not negotiated.
</ins><span class="cx">         return 0.0;
</span><span class="cx"> 
</span><del>-    return resourceTimeToDocumentMilliseconds(m_timing-&gt;sslStart);
</del><ins>+    return resourceTimeToDocumentMilliseconds(m_timing-&gt;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-&gt;sendStart);
</del><ins>+    return resourceTimeToDocumentMilliseconds(m_timing-&gt;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-&gt;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-&gt;requestTime) + deltaMilliseconds;
</del><ins>+    return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_requestingDocument.get()-&gt;loader()-&gt;timing()-&gt;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 &quot;backfill&quot; with fetchStart.
</span><del>-    int dnsStart = timing-&gt;dnsStart;
-    if (dnsStart &lt; 0)
</del><ins>+    int domainLookupStart = timing-&gt;domainLookupStart;
+    if (domainLookupStart &lt; 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 &quot;backfill&quot; with domainLookupStart.
</span><del>-    int dnsEnd = timing-&gt;dnsEnd;
-    if (dnsEnd &lt; 0)
</del><ins>+    int domainLookupEnd = timing-&gt;domainLookupEnd;
+    if (domainLookupEnd &lt; 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-&gt;dnsEnd &gt;= 0 &amp;&amp; timing-&gt;dnsEnd &gt; connectStart)
-        connectStart = timing-&gt;dnsEnd;
</del><ins>+    if (timing-&gt;domainLookupEnd &gt;= 0 &amp;&amp; timing-&gt;domainLookupEnd &gt; connectStart)
+        connectStart = timing-&gt;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-&gt;sslStart;
-    if (sslStart &lt; 0)
</del><ins>+    int secureConnectionStart = timing-&gt;secureConnectionStart;
+    if (secureConnectionStart &lt; 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-&gt;sendStart &gt;= 0);
-    return resourceLoadTimeRelativeToAbsolute(timing-&gt;sendStart);
</del><ins>+    ASSERT(timing-&gt;requestStart &gt;= 0);
+    return resourceLoadTimeRelativeToAbsolute(timing-&gt;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-&gt;receiveHeadersEnd &gt;= 0);
-    return resourceLoadTimeRelativeToAbsolute(timing-&gt;receiveHeadersEnd);
</del><ins>+    ASSERT(timing-&gt;responseStart &gt;= 0);
+    return resourceLoadTimeRelativeToAbsolute(timing-&gt;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 &gt;= 0);
</span><del>-    ResourceLoadTiming* resourceTiming = resourceLoadTiming();
-    ASSERT(resourceTiming);
-    return monotonicTimeToIntegerMilliseconds(resourceTiming-&gt;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&amp;);
</span><span class="cx">     static void setClientCertificate(const String&amp; 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 &quot;config.h&quot;
-#include &quot;ResourceLoadTiming.h&quot;
-
-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&lt;ResourceLoadTiming&gt; deepCopy()
</span><span class="cx">     {
</span><span class="cx">         RefPtr&lt;ResourceLoadTiming&gt; timing = create();
</span><del>-        timing-&gt;requestTime = requestTime;
-        timing-&gt;proxyStart = proxyStart;
-        timing-&gt;proxyEnd = proxyEnd;
-        timing-&gt;dnsStart = dnsStart;
-        timing-&gt;dnsEnd = dnsEnd;
</del><ins>+        timing-&gt;domainLookupStart = domainLookupStart;
+        timing-&gt;domainLookupEnd = domainLookupEnd;
</ins><span class="cx">         timing-&gt;connectStart = connectStart;
</span><span class="cx">         timing-&gt;connectEnd = connectEnd;
</span><del>-        timing-&gt;sendStart = sendStart;
-        timing-&gt;sendEnd = sendEnd;
-        timing-&gt;receiveHeadersEnd = receiveHeadersEnd;
-        timing-&gt;sslStart = sslStart;
-        timing-&gt;sslEnd = sslEnd;
</del><ins>+        timing-&gt;requestStart = requestStart;
+        timing-&gt;responseStart = responseStart;
+        timing-&gt;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&amp; other) const
</span><span class="cx">     {
</span><del>-        return requestTime == other.requestTime
-            &amp;&amp; proxyStart == other.proxyStart
-            &amp;&amp; proxyEnd == other.proxyEnd
-            &amp;&amp; dnsStart == other.dnsStart
-            &amp;&amp; dnsEnd == other.dnsEnd
</del><ins>+        return domainLookupStart == other.domainLookupStart
+            &amp;&amp; domainLookupEnd == other.domainLookupEnd
</ins><span class="cx">             &amp;&amp; connectStart == other.connectStart
</span><span class="cx">             &amp;&amp; connectEnd == other.connectEnd
</span><del>-            &amp;&amp; sendStart == other.sendStart
-            &amp;&amp; sendEnd == other.sendEnd
-            &amp;&amp; receiveHeadersEnd == other.receiveHeadersEnd
-            &amp;&amp; sslStart == other.sslStart
-            &amp;&amp; sslEnd == other.sslEnd;
</del><ins>+            &amp;&amp; requestStart == other.requestStart
+            &amp;&amp; responseStart == other.responseStart
+            &amp;&amp; secureConnectionStart == other.secureConnectionStart;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool operator!=(const ResourceLoadTiming&amp; 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 &lt;wtf/text/Base64.h&gt;
</span><span class="cx"> #import &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><ins>+#if __has_include(&lt;Foundation/NSURLConnectionPrivate.h&gt;)
+#import &lt;Foundation/NSURLConnectionPrivate.h&gt;
+#else
+@interface NSURLConnection (TimingData)
++ (void)_setCollectsTimingData:(BOOL)collect;
+@end
+#endif
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #import &lt;CFNetwork/CFURLRequest.h&gt;
</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-&gt;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 &quot;SharedBuffer.h&quot;
</span><span class="cx"> #import &quot;WebCoreURLResponse.h&quot;
</span><span class="cx"> 
</span><ins>+#if __has_include(&lt;CFNetwork/CFNSURLConnection.h&gt;)
+#import &lt;CFNetwork/CFNSURLConnection.h&gt;
+#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-&gt;quickLookHandle())
</span><span class="cx">         r = m_handle-&gt;quickLookHandle()-&gt;nsResponse();
</span><span class="cx"> #endif
</span><del>-
-    m_handle-&gt;client()-&gt;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:@&quot;_kCFNTimingDataTimingDataInit&quot;] doubleValue];
+        
+        double domainLookupStart = [[timingData valueForKey:@&quot;_kCFNTimingDataDomainLookupStart&quot;] doubleValue];
+        double domainLookupEnd = [[timingData valueForKey:@&quot;_kCFNTimingDataDomainLookupEnd&quot;] doubleValue];
+        double connectStart = [[timingData valueForKey:@&quot;_kCFNTimingDataConnectStart&quot;] doubleValue];
+        double secureConnectionStart = [[timingData valueForKey:@&quot;_kCFNTimingDataSecureConnectionStart&quot;] doubleValue];
+        double connectEnd = [[timingData valueForKey:@&quot;_kCFNTimingDataConnectEnd&quot;] doubleValue];
+        double requestStart = [[timingData valueForKey:@&quot;_kCFNTimingDataRequestStart&quot;] doubleValue];
+        double responseStart = [[timingData valueForKey:@&quot;_kCFNTimingDataResponseStart&quot;] doubleValue];
+        
+        if (timing) {
+            timing-&gt;domainLookupStart = domainLookupStart &lt;= 0.0 ? -1 : (domainLookupStart - referenceStart) * 1000;
+            timing-&gt;domainLookupEnd = domainLookupEnd &lt;= 0.0 ? -1 : (domainLookupEnd - referenceStart) * 1000;
+            timing-&gt;connectStart = connectStart &lt;= 0.0 ? -1 : (connectStart - referenceStart) * 1000;
+            timing-&gt;secureConnectionStart = secureConnectionStart &lt;= 0.0 ? -1 : (secureConnectionStart - referenceStart) * 1000;
+            timing-&gt;connectEnd = connectEnd &lt;= 0.0 ? -1 : (connectEnd - referenceStart) * 1000;
+            timing-&gt;requestStart = requestStart &lt;= 0.0 ? -1 : (requestStart - referenceStart) * 1000;
+            timing-&gt;responseStart = responseStart &lt;= 0.0 ? -1 : (responseStart - referenceStart) * 1000;
+        }
+    }
+#else
+    UNUSED_PARAM(connection);
+#endif
+    
+    m_handle-&gt;client()-&gt;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 &quot;WebCoreURLResponse.h&quot;
</span><span class="cx"> #import &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><ins>+#if __has_include(&lt;CFNetwork/CFNSURLConnection.h&gt;)
+#import &lt;CFNetwork/CFNSURLConnection.h&gt;
+#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, &quot;Handle %p delegate connection:%p didReceiveResponse:%p (HTTP status %d, reported MIMEType '%s')&quot;, 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-&gt;firstRequest().nsURLRequest(DoNotUpdateHTTPBody) _propertyForKey:@&quot;ForceHTMLMIMEType&quot;])
</span><span class="cx">             [r _setMIMEType:@&quot;text/html&quot;];
</span><del>-
-        m_handle-&gt;client()-&gt;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:@&quot;_kCFNTimingDataTimingDataInit&quot;] doubleValue];
+            
+            double domainLookupStart = [[timingData valueForKey:@&quot;_kCFNTimingDataDomainLookupStart&quot;] doubleValue];
+            double domainLookupEnd = [[timingData valueForKey:@&quot;_kCFNTimingDataDomainLookupEnd&quot;] doubleValue];
+            double connectStart = [[timingData valueForKey:@&quot;_kCFNTimingDataConnectStart&quot;] doubleValue];
+            double secureConnectionStart = [[timingData valueForKey:@&quot;_kCFNTimingDataSecureConnectionStart&quot;] doubleValue];
+            double connectEnd = [[timingData valueForKey:@&quot;_kCFNTimingDataConnectEnd&quot;] doubleValue];
+            double requestStart = [[timingData valueForKey:@&quot;_kCFNTimingDataRequestStart&quot;] doubleValue];
+            double responseStart = [[timingData valueForKey:@&quot;_kCFNTimingDataResponseStart&quot;] doubleValue];
+            
+            if (timing) {
+                timing-&gt;domainLookupStart = domainLookupStart &lt;= 0.0 ? -1 : (domainLookupStart - referenceStart) * 1000;
+                timing-&gt;domainLookupEnd = domainLookupEnd &lt;= 0.0 ? -1 : (domainLookupEnd - referenceStart) * 1000;
+                timing-&gt;connectStart = connectStart &lt;= 0.0 ? -1 : (connectStart - referenceStart) * 1000;
+                timing-&gt;secureConnectionStart = secureConnectionStart &lt;= 0.0 ? -1 : (secureConnectionStart - referenceStart) * 1000;
+                timing-&gt;connectEnd = connectEnd &lt;= 0.0 ? -1 : (connectEnd - referenceStart) * 1000;
+                timing-&gt;requestStart = requestStart &lt;= 0.0 ? -1 : (requestStart - referenceStart) * 1000;
+                timing-&gt;responseStart = responseStart &lt;= 0.0 ? -1 : (responseStart - referenceStart) * 1000;
+            }
+        }
+#else
+        UNUSED_PARAM(connection);
+#endif
+        m_handle-&gt;client()-&gt;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-&gt;getInternal();
</span><span class="cx"> 
</span><del>-#if ENABLE(WEB_TIMING)
-    if (d-&gt;m_response.resourceLoadTiming())
-        d-&gt;m_response.resourceLoadTiming()-&gt;receiveHeadersEnd = milisecondsSinceRequest(d-&gt;m_response.resourceLoadTiming()-&gt;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-&gt;getInternal();
</span><span class="cx">     ResourceResponse&amp; redirectResponse = d-&gt;m_response;
</span><span class="cx">     redirectResponse.setResourceLoadTiming(ResourceLoadTiming::create());
</span><del>-    redirectResponse.resourceLoadTiming()-&gt;requestTime = monotonicallyIncreasingTime();
</del><ins>+    handle-&gt;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&lt;int&gt;((monotonicallyIncreasingTime() - requestTime) * 1000.0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void wroteBodyCallback(SoupMessage*, gpointer data)
-{
-    RefPtr&lt;ResourceHandle&gt; handle = static_cast&lt;ResourceHandle*&gt;(data);
-    if (!handle)
-        return;
-
-    ResourceHandleInternal* d = handle-&gt;getInternal();
-    if (!d-&gt;m_response.resourceLoadTiming())
-        return;
-
-    d-&gt;m_response.resourceLoadTiming()-&gt;sendEnd = milisecondsSinceRequest(d-&gt;m_response.resourceLoadTiming()-&gt;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-&gt;m_response.resourceLoadTiming())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    d-&gt;m_response.resourceLoadTiming()-&gt;sendStart = milisecondsSinceRequest(d-&gt;m_response.resourceLoadTiming()-&gt;requestTime);
-    if (d-&gt;m_response.resourceLoadTiming()-&gt;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-&gt;m_response.resourceLoadTiming()-&gt;sendStart -=
-            d-&gt;m_response.resourceLoadTiming()-&gt;sslEnd - d-&gt;m_response.resourceLoadTiming()-&gt;sslStart;
-    }
</del><ins>+    d-&gt;m_response.resourceLoadTiming()-&gt;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-&gt;getInternal();
</span><del>-    int deltaTime = milisecondsSinceRequest(d-&gt;m_response.resourceLoadTiming()-&gt;requestTime);
</del><ins>+    int deltaTime = milisecondsSinceRequest(handle-&gt;m_requestTime);
</ins><span class="cx">     switch (event) {
</span><span class="cx">     case G_SOCKET_CLIENT_RESOLVING:
</span><del>-        d-&gt;m_response.resourceLoadTiming()-&gt;dnsStart = deltaTime;
</del><ins>+        d-&gt;m_response.resourceLoadTiming()-&gt;domainLookupStart = deltaTime;
</ins><span class="cx">         break;
</span><span class="cx">     case G_SOCKET_CLIENT_RESOLVED:
</span><del>-        d-&gt;m_response.resourceLoadTiming()-&gt;dnsEnd = deltaTime;
</del><ins>+        d-&gt;m_response.resourceLoadTiming()-&gt;domainLookupEnd = deltaTime;
</ins><span class="cx">         break;
</span><span class="cx">     case G_SOCKET_CLIENT_CONNECTING:
</span><span class="cx">         d-&gt;m_response.resourceLoadTiming()-&gt;connectStart = deltaTime;
</span><del>-        if (d-&gt;m_response.resourceLoadTiming()-&gt;dnsStart != -1)
</del><ins>+        if (d-&gt;m_response.resourceLoadTiming()-&gt;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-&gt;m_response.resourceLoadTiming()-&gt;connectStart -=
</span><del>-                d-&gt;m_response.resourceLoadTiming()-&gt;dnsEnd - d-&gt;m_response.resourceLoadTiming()-&gt;dnsStart;
</del><ins>+                d-&gt;m_response.resourceLoadTiming()-&gt;domainLookupEnd - d-&gt;m_response.resourceLoadTiming()-&gt;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 &amp; 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-&gt;m_response.resourceLoadTiming()-&gt;proxyStart = deltaTime;
</del><span class="cx">         break;
</span><span class="cx">     case G_SOCKET_CLIENT_PROXY_NEGOTIATED:
</span><del>-        d-&gt;m_response.resourceLoadTiming()-&gt;proxyEnd = deltaTime;
</del><span class="cx">         break;
</span><span class="cx">     case G_SOCKET_CLIENT_TLS_HANDSHAKING:
</span><del>-        d-&gt;m_response.resourceLoadTiming()-&gt;sslStart = deltaTime;
</del><ins>+        d-&gt;m_response.resourceLoadTiming()-&gt;secureConnectionStart = deltaTime;
</ins><span class="cx">         break;
</span><span class="cx">     case G_SOCKET_CLIENT_TLS_HANDSHAKED:
</span><del>-        d-&gt;m_response.resourceLoadTiming()-&gt;sslEnd = deltaTime;
</del><span class="cx">         break;
</span><span class="cx">     case G_SOCKET_CLIENT_COMPLETE:
</span><span class="cx">         d-&gt;m_response.resourceLoadTiming()-&gt;connectEnd = deltaTime;
</span><span class="lines">@@ -974,7 +945,6 @@
</span><span class="cx">     d-&gt;m_response.setResourceLoadTiming(ResourceLoadTiming::create());
</span><span class="cx">     g_signal_connect(d-&gt;m_soupMessage.get(), &quot;network-event&quot;, G_CALLBACK(networkEventCallback), handle);
</span><span class="cx">     g_signal_connect(d-&gt;m_soupMessage.get(), &quot;restarted&quot;, G_CALLBACK(restartedCallback), handle);
</span><del>-    g_signal_connect(d-&gt;m_soupMessage.get(), &quot;wrote-body&quot;, 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-&gt;m_response.resourceLoadTiming())
</span><del>-        d-&gt;m_response.resourceLoadTiming()-&gt;requestTime = monotonicallyIncreasingTime();
</del><ins>+        m_requestTime = monotonicallyIncreasingTime();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (d-&gt;m_firstRequest.timeoutInterval() &gt; 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  &lt;achristensen@webkit.org&gt;
+
+        Progress on web timing.
+        https://bugs.webkit.org/show_bug.cgi?id=132574
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;ResourceResponse&gt;::encode):
+        (IPC::ArgumentCoder&lt;ResourceResponse&gt;::decode):
+        Transfer ResourceLoadTiming values if they exist.
+
</ins><span class="cx"> 2014-05-12  Dan Bernstein  &lt;mitz@apple.com&gt;
</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 &lt;&lt; resourceResponse.httpStatusText();
</span><span class="cx">         encoder &lt;&lt; resourceResponse.suggestedFilename();
</span><span class="cx">     }
</span><ins>+    
+#if ENABLE(WEB_TIMING)
+    ResourceLoadTiming* timing = resourceResponse.resourceLoadTiming();
+    bool hasResourceLoadTiming = timing;
+    encoder &lt;&lt; hasResourceLoadTiming;
+    if (hasResourceLoadTiming) {
+        encoder &lt;&lt; timing-&gt;domainLookupStart;
+        encoder &lt;&lt; timing-&gt;domainLookupEnd;
+        encoder &lt;&lt; timing-&gt;connectStart;
+        encoder &lt;&lt; timing-&gt;connectEnd;
+        encoder &lt;&lt; timing-&gt;requestStart;
+        encoder &lt;&lt; timing-&gt;responseStart;
+        encoder &lt;&lt; timing-&gt;secureConnectionStart;
+    }
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ArgumentCoder&lt;ResourceResponse&gt;::decode(ArgumentDecoder&amp; decoder, ResourceResponse&amp; 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-&gt;domainLookupStart)
+            || !decoder.decode(timing-&gt;domainLookupEnd)
+            || !decoder.decode(timing-&gt;connectStart)
+            || !decoder.decode(timing-&gt;connectEnd)
+            || !decoder.decode(timing-&gt;requestStart)
+            || !decoder.decode(timing-&gt;responseStart)
+            || !decoder.decode(timing-&gt;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>