<!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>[204736] trunk</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/204736">204736</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-08-22 13:28:39 -0700 (Mon, 22 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make NetworkLoadTiming use double for higher precision in Resource Timing
https://bugs.webkit.org/show_bug.cgi?id=161051
Patch by Johan K. Jensen <johan_jensen@apple.com> on 2016-08-22
Reviewed by Alex Christensen.
Source/WebCore:
Test: http/tests/misc/resource-timing-resolution.html
* page/Performance.h:
* page/Performance.cpp:
(WebCore::Performance::now):
(WebCore::Performance::reduceTimeResolution):
Add new function to reduce time resolution.
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDocumentMilliseconds):
(WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
Only use the reduced timing resolution for full timestamps and deltas.
(WebCore::PerformanceResourceTiming::connectStart): Use doubles.
* page/PerformanceResourceTiming.h: Use doubles.
* page/PerformanceTiming.cpp: Use doubles.
(WebCore::toIntegerMilliseconds): Use doubles.
(WebCore::PerformanceTiming::connectStart): Use doubles.
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart): Use doubles.
* page/PerformanceTiming.h: Use doubles.
* platform/network/NetworkLoadTiming.h: Use doubles.
* platform/network/curl/ResourceHandleManager.cpp: Use doubles.
(WebCore::milisecondsSinceRequest): Use doubles.
(WebCore::calculateWebTimingInformations): Use doubles.
* platform/network/soup/ResourceHandleSoup.cpp: Use doubles.
(WebCore::milisecondsSinceRequest): Use doubles.
(WebCore::networkEventCallback): Use doubles.
LayoutTests:
Test that resources timing information are close deltas to a multiple of expected resolution.
* http/tests/misc/resource-timing-resolution-expected.txt: Added.
* http/tests/misc/resource-timing-resolution.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagePerformancecpp">trunk/Source/WebCore/page/Performance.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceh">trunk/Source/WebCore/page/Performance.h</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="#trunkSourceWebCorepagePerformanceTimingcpp">trunk/Source/WebCore/page/PerformanceTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceTimingh">trunk/Source/WebCore/page/PerformanceTiming.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkNetworkLoadTimingh">trunk/Source/WebCore/platform/network/NetworkLoadTiming.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlResourceHandleManagercpp">trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceHandleSoupcpp">trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsmiscresourcetimingresolutionexpectedtxt">trunk/LayoutTests/http/tests/misc/resource-timing-resolution-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmiscresourcetimingresolutionhtml">trunk/LayoutTests/http/tests/misc/resource-timing-resolution.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/LayoutTests/ChangeLog        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-08-22 Johan K. Jensen <johan_jensen@apple.com>
+
+ Make NetworkLoadTiming use double for higher precision in Resource Timing
+ https://bugs.webkit.org/show_bug.cgi?id=161051
+
+ Reviewed by Alex Christensen.
+
+ Test that resources timing information are close deltas to a multiple of expected resolution.
+
+ * http/tests/misc/resource-timing-resolution-expected.txt: Added.
+ * http/tests/misc/resource-timing-resolution.html: Added.
+
</ins><span class="cx"> 2016-08-22 Javier Fernandez <jfernandez@igalia.com>
</span><span class="cx">
</span><span class="cx"> [css-grid] Stretch alignment doesn't work for orthogonal flows
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscresourcetimingresolutionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/resource-timing-resolution-expected.txt (0 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/resource-timing-resolution-expected.txt         (rev 0)
+++ trunk/LayoutTests/http/tests/misc/resource-timing-resolution-expected.txt        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Verifies the minimum resolution is 5 microseconds.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS t0 !== t1 is true
+PASS shouldBeNearZeroOrOne < 1e-10 || Math.abs(shouldBeNearZeroOrOne - 1) < 1e-10 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmiscresourcetimingresolutionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/misc/resource-timing-resolution.html (0 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/misc/resource-timing-resolution.html         (rev 0)
+++ trunk/LayoutTests/http/tests/misc/resource-timing-resolution.html        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+<html>
+<head>
+<script src="../../js-test-resources/js-test-pre.js"></script>
+<script>
+ window.jsTestIsAsync = true;
+ if (window.internals)
+ window.internals.setResourceTimingSupport(true);
+</script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("Verifies the minimum resolution is 5 microseconds.");
+var url = "../resources/square100.png";
+document.write("<img src='" + url + "'>");
+
+var t0, t1, shouldBeNearZeroOrOne;
+window.addEventListener("load", function() {
+ var entries = performance.getEntries();
+ t0 = entries[0].fetchStart;
+ t1 = entries[1].fetchStart;
+ shouldBe("t0 !== t1", "true");
+
+ var expectedResolutionMilliseconds = 0.005;
+ var integerMultipleOfResolution = (t1 - t0) / expectedResolutionMilliseconds;
+ shouldBeNearZeroOrOne = integerMultipleOfResolution % 1;
+ shouldBe("shouldBeNearZeroOrOne < 1e-10 || Math.abs(shouldBeNearZeroOrOne - 1) < 1e-10", "true");
+ if (window.internals)
+ window.internals.setResourceTimingSupport(false);
+ finishJSTest();
+});
+</script>
+<script src="../../js-test-resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/ChangeLog        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2016-08-22 Johan K. Jensen <johan_jensen@apple.com>
+
+ Make NetworkLoadTiming use double for higher precision in Resource Timing
+ https://bugs.webkit.org/show_bug.cgi?id=161051
+
+ Reviewed by Alex Christensen.
+
+ Test: http/tests/misc/resource-timing-resolution.html
+
+ * page/Performance.h:
+ * page/Performance.cpp:
+ (WebCore::Performance::now):
+ (WebCore::Performance::reduceTimeResolution):
+ Add new function to reduce time resolution.
+
+ * page/PerformanceResourceTiming.cpp:
+ (WebCore::monotonicTimeToDocumentMilliseconds):
+ (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
+ Only use the reduced timing resolution for full timestamps and deltas.
+
+ (WebCore::PerformanceResourceTiming::connectStart): Use doubles.
+ * page/PerformanceResourceTiming.h: Use doubles.
+ * page/PerformanceTiming.cpp: Use doubles.
+ (WebCore::toIntegerMilliseconds): Use doubles.
+ (WebCore::PerformanceTiming::connectStart): Use doubles.
+ (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart): Use doubles.
+ * page/PerformanceTiming.h: Use doubles.
+ * platform/network/NetworkLoadTiming.h: Use doubles.
+ * platform/network/curl/ResourceHandleManager.cpp: Use doubles.
+ (WebCore::milisecondsSinceRequest): Use doubles.
+ (WebCore::calculateWebTimingInformations): Use doubles.
+ * platform/network/soup/ResourceHandleSoup.cpp: Use doubles.
+ (WebCore::milisecondsSinceRequest): Use doubles.
+ (WebCore::networkEventCallback): Use doubles.
+
</ins><span class="cx"> 2016-08-22 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix Mac CMake build after r204717.
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.cpp (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.cpp        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/page/Performance.cpp        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -218,8 +218,13 @@
</span><span class="cx"> double Performance::now() const
</span><span class="cx"> {
</span><span class="cx"> double nowSeconds = monotonicallyIncreasingTime() - m_referenceTime;
</span><ins>+ return 1000.0 * reduceTimeResolution(nowSeconds);
+}
+
+double Performance::reduceTimeResolution(double seconds)
+{
</ins><span class="cx"> const double resolutionSeconds = 0.000005;
</span><del>- return 1000.0 * floor(nowSeconds / resolutionSeconds) * resolutionSeconds;
</del><ins>+ return floor(seconds / resolutionSeconds) * resolutionSeconds;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.h (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.h        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/page/Performance.h        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -83,6 +83,8 @@
</span><span class="cx"> void webkitClearMeasures(const String& measureName);
</span><span class="cx"> #endif // ENABLE(USER_TIMING)
</span><span class="cx">
</span><ins>+ static double reduceTimeResolution(double seconds);
+
</ins><span class="cx"> private:
</span><span class="cx"> explicit Performance(Frame&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.cpp (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> static double monotonicTimeToDocumentMilliseconds(Document* document, double seconds)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(seconds >= 0.0);
</span><del>- return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(seconds) * 1000.0;
</del><ins>+ return Performance::reduceTimeResolution(document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(seconds)) * 1000.0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool passesTimingAllowCheck(const ResourceResponse& response, Document* requestingDocument)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> return domainLookupEnd();
</span><span class="cx">
</span><span class="cx"> // connectStart includes any DNS time, so we may need to trim that off.
</span><del>- int connectStart = m_timing.connectStart;
</del><ins>+ double connectStart = m_timing.connectStart;
</ins><span class="cx"> if (m_timing.domainLookupEnd >= 0)
</span><span class="cx"> connectStart = m_timing.domainLookupEnd;
</span><span class="cx">
</span><span class="lines">@@ -191,11 +191,13 @@
</span><span class="cx"> return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_finishTime);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-double PerformanceResourceTiming::resourceTimeToDocumentMilliseconds(int deltaMilliseconds) const
</del><ins>+double PerformanceResourceTiming::resourceTimeToDocumentMilliseconds(double deltaMilliseconds) const
</ins><span class="cx"> {
</span><span class="cx"> if (!deltaMilliseconds)
</span><span class="cx"> return 0.0;
</span><del>- return monotonicTimeToDocumentMilliseconds(m_requestingDocument.get(), m_requestingDocument->loader()->timing().startTime()) + deltaMilliseconds;
</del><ins>+ double documentStartTime = m_requestingDocument->loader()->timing().monotonicTimeToZeroBasedDocumentTime(m_requestingDocument->loader()->timing().startTime()) * 1000.0;
+ double resourceTimeSeconds = (documentStartTime + deltaMilliseconds) / 1000.0;
+ return 1000.0 * Performance::reduceTimeResolution(resourceTimeSeconds);
</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 (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.h        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.h        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> PerformanceResourceTiming(const AtomicString& initatorType, const ResourceRequest&, const ResourceResponse&, double initiationTime, double finishTime, Document*);
</span><span class="cx"> ~PerformanceResourceTiming();
</span><span class="cx">
</span><del>- double resourceTimeToDocumentMilliseconds(int deltaMilliseconds) const;
</del><ins>+ double resourceTimeToDocumentMilliseconds(double deltaMilliseconds) const;
</ins><span class="cx">
</span><span class="cx"> AtomicString m_initiatorType;
</span><span class="cx"> NetworkLoadTiming m_timing;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.cpp (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.cpp        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/page/PerformanceTiming.cpp        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include "FrameLoader.h"
</span><span class="cx"> #include "LoadTiming.h"
</span><span class="cx"> #include "NetworkLoadTiming.h"
</span><ins>+#include "Performance.h"
</ins><span class="cx"> #include "ResourceResponse.h"
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx">
</span><span class="lines">@@ -48,7 +49,8 @@
</span><span class="cx"> static unsigned long long toIntegerMilliseconds(double seconds)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(seconds >= 0);
</span><del>- return static_cast<unsigned long long>(seconds * 1000.0);
</del><ins>+ double reducedSeconds = Performance::reduceTimeResolution(seconds);
+ return static_cast<unsigned long long>(reducedSeconds * 1000.0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PerformanceTiming::PerformanceTiming(Frame* frame)
</span><span class="lines">@@ -164,7 +166,7 @@
</span><span class="cx">
</span><span class="cx"> // connectStart will be -1 when a network request is not made.
</span><span class="cx"> // Rather than exposing a special value that indicates no new connection, we "backfill" with domainLookupEnd.
</span><del>- int connectStart = timing.connectStart;
</del><ins>+ double connectStart = timing.connectStart;
</ins><span class="cx"> if (connectStart < 0)
</span><span class="cx"> return domainLookupEnd();
</span><span class="cx">
</span><span class="lines">@@ -331,7 +333,7 @@
</span><span class="cx"> return &loader->timing();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned long long PerformanceTiming::resourceLoadTimeRelativeToFetchStart(int relativeMilliseconds) const
</del><ins>+unsigned long long PerformanceTiming::resourceLoadTimeRelativeToFetchStart(double relativeMilliseconds) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(relativeMilliseconds >= 0);
</span><span class="cx"> return fetchStart() + relativeMilliseconds;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.h (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.h        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/page/PerformanceTiming.h        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> const DocumentTiming* documentTiming() const;
</span><span class="cx"> DocumentLoader* documentLoader() const;
</span><span class="cx"> LoadTiming* loadTiming() const;
</span><del>- unsigned long long resourceLoadTimeRelativeToFetchStart(int) const;
</del><ins>+ unsigned long long resourceLoadTimeRelativeToFetchStart(double) const;
</ins><span class="cx"> unsigned long long monotonicTimeToIntegerMilliseconds(double) const;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkNetworkLoadTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/NetworkLoadTiming.h (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/NetworkLoadTiming.h        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/platform/network/NetworkLoadTiming.h        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -93,14 +93,14 @@
</span><span class="cx"> template<class Encoder> void encode(Encoder&) const;
</span><span class="cx"> template<class Decoder> static bool decode(Decoder&, NetworkLoadTiming&);
</span><span class="cx">
</span><del>- // These are millisecond deltas from the navigation start.
- int domainLookupStart;
- int domainLookupEnd;
- int connectStart;
- int connectEnd;
- int requestStart;
- int responseStart;
- int secureConnectionStart;
</del><ins>+ // These are millisecond deltas from the start time.
+ double domainLookupStart;
+ double domainLookupEnd;
+ double connectStart;
+ double connectEnd;
+ double requestStart;
+ double responseStart;
+ double secureConnectionStart;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlResourceHandleManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -169,9 +169,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><del>-static int milisecondsSinceRequest(double requestTime)
</del><ins>+static double milisecondsSinceRequest(double requestTime)
</ins><span class="cx"> {
</span><del>- return static_cast<int>((monotonicallyIncreasingTime() - requestTime) * 1000.0);
</del><ins>+ return (monotonicallyIncreasingTime() - requestTime) * 1000.0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void calculateWebTimingInformations(ResourceHandleInternal* d)
</span><span class="lines">@@ -189,16 +189,16 @@
</span><span class="cx"> curl_easy_getinfo(d->m_handle, CURLINFO_PRETRANSFER_TIME, &preTransferTime);
</span><span class="cx">
</span><span class="cx"> d->m_response.networkLoadTiming().domainLookupStart = 0;
</span><del>- d->m_response.networkLoadTiming().domainLookupEnd = static_cast<int>(dnslookupTime * 1000);
</del><ins>+ d->m_response.networkLoadTiming().domainLookupEnd = dnslookupTime * 1000;
</ins><span class="cx">
</span><del>- d->m_response.networkLoadTiming().connectStart = static_cast<int>(dnslookupTime * 1000);
- d->m_response.networkLoadTiming().connectEnd = static_cast<int>(connectTime * 1000);
</del><ins>+ d->m_response.networkLoadTiming().connectStart = dnslookupTime * 1000;
+ d->m_response.networkLoadTiming().connectEnd = connectTime * 1000;
</ins><span class="cx">
</span><del>- d->m_response.networkLoadTiming().requestStart = static_cast<int>(connectTime *1000);
- d->m_response.networkLoadTiming().responseStart =static_cast<int>(preTransferTime * 1000);
</del><ins>+ d->m_response.networkLoadTiming().requestStart = connectTime * 1000;
+ d->m_response.networkLoadTiming().responseStart = preTransferTime * 1000;
</ins><span class="cx">
</span><span class="cx"> if (appConnectTime)
</span><del>- d->m_response.networkLoadTiming().secureConnectionStart = static_cast<int>(connectTime * 1000);
</del><ins>+ d->m_response.networkLoadTiming().secureConnectionStart = connectTime * 1000;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceHandleSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (204735 => 204736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2016-08-22 20:13:36 UTC (rev 204735)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2016-08-22 20:28:39 UTC (rev 204736)
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx"> static void sendRequestCallback(GObject*, GAsyncResult*, gpointer);
</span><span class="cx"> static void readCallback(GObject*, GAsyncResult*, gpointer);
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><del>-static int milisecondsSinceRequest(double requestTime);
</del><ins>+static double milisecondsSinceRequest(double requestTime);
</ins><span class="cx"> #endif
</span><span class="cx"> static void continueAfterDidReceiveResponse(ResourceHandle*);
</span><span class="cx">
</span><span class="lines">@@ -836,9 +836,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><del>-static int milisecondsSinceRequest(double requestTime)
</del><ins>+static double milisecondsSinceRequest(double requestTime)
</ins><span class="cx"> {
</span><del>- return static_cast<int>((monotonicallyIncreasingTime() - requestTime) * 1000.0);
</del><ins>+ return (monotonicallyIncreasingTime() - requestTime) * 1000.0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ResourceHandle::didStartRequest()
</span><span class="lines">@@ -863,7 +863,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ResourceHandleInternal* d = handle->getInternal();
</span><del>- int deltaTime = milisecondsSinceRequest(handle->m_requestTime);
</del><ins>+ double deltaTime = milisecondsSinceRequest(handle->m_requestTime);
</ins><span class="cx"> switch (event) {
</span><span class="cx"> case G_SOCKET_CLIENT_RESOLVING:
</span><span class="cx"> d->m_response.networkLoadTiming().domainLookupStart = deltaTime;
</span></span></pre>
</div>
</div>
</body>
</html>