<!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>[211074] trunk/Source/WebCore</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/211074">211074</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-23 19:12:53 -0800 (Mon, 23 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Cleanup WEB_TIMING code
https://bugs.webkit.org/show_bug.cgi?id=167339
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-23
Reviewed by Alex Christensen.
Stylistic cleanup to WEB_TIMING related code.
* bindings/js/JSPerformanceEntryCustom.cpp:
* loader/ResourceTimingInformation.cpp:
* loader/ResourceTimingInformation.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):
* page/Performance.cpp:
(WebCore::Performance::getEntries):
(WebCore::Performance::getEntriesByType):
(WebCore::Performance::setResourceTimingBufferSize):
(WebCore::Performance::isResourceTimingBufferFull):
* page/Performance.h:
* page/PerformanceMark.h:
* page/PerformanceMeasure.h:
* page/PerformanceNavigation.h:
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
* page/PerformanceResourceTiming.h:
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::documentLoader):
(WebCore::PerformanceTiming::documentTiming):
(WebCore::PerformanceTiming::loadTiming):
* page/PerformanceTiming.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp">trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceTimingInformationcpp">trunk/Source/WebCore/loader/ResourceTimingInformation.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceTimingInformationh">trunk/Source/WebCore/loader/ResourceTimingInformation.h</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoadercpp">trunk/Source/WebCore/loader/SubresourceLoader.cpp</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="#trunkSourceWebCorepagePerformanceMarkh">trunk/Source/WebCore/page/PerformanceMark.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceMeasureh">trunk/Source/WebCore/page/PerformanceMeasure.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceNavigationh">trunk/Source/WebCore/page/PerformanceNavigation.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="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/ChangeLog        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2017-01-23 Joseph Pecoraro <pecoraro@apple.com>
+
+ Cleanup WEB_TIMING code
+ https://bugs.webkit.org/show_bug.cgi?id=167339
+
+ Reviewed by Alex Christensen.
+
+ Stylistic cleanup to WEB_TIMING related code.
+
+ * bindings/js/JSPerformanceEntryCustom.cpp:
+ * loader/ResourceTimingInformation.cpp:
+ * loader/ResourceTimingInformation.h:
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::didFinishLoading):
+ * page/Performance.cpp:
+ (WebCore::Performance::getEntries):
+ (WebCore::Performance::getEntriesByType):
+ (WebCore::Performance::setResourceTimingBufferSize):
+ (WebCore::Performance::isResourceTimingBufferFull):
+ * page/Performance.h:
+ * page/PerformanceMark.h:
+ * page/PerformanceMeasure.h:
+ * page/PerformanceNavigation.h:
+ * page/PerformanceResourceTiming.cpp:
+ (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
+ (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
+ * page/PerformanceResourceTiming.h:
+ * page/PerformanceTiming.cpp:
+ (WebCore::PerformanceTiming::documentLoader):
+ (WebCore::PerformanceTiming::documentTiming):
+ (WebCore::PerformanceTiming::loadTiming):
+ * page/PerformanceTiming.h:
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::createCFURLConnection):
+
</ins><span class="cx"> 2017-01-23 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> URLParser should fail to parse percent-encoded invalid UTF-8 sequences
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -31,18 +31,20 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><ins>+
</ins><span class="cx"> #include "JSPerformanceEntry.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><del>-#if ENABLE(USER_TIMING)
-#include "JSPerformanceMark.h"
-#include "JSPerformanceMeasure.h"
-#endif
</del><span class="cx"> #include "JSPerformanceResourceTiming.h"
</span><span class="cx"> #include "PerformanceMark.h"
</span><span class="cx"> #include "PerformanceMeasure.h"
</span><span class="cx"> #include "PerformanceResourceTiming.h"
</span><span class="cx">
</span><ins>+#if ENABLE(USER_TIMING)
+#include "JSPerformanceMark.h"
+#include "JSPerformanceMeasure.h"
+#endif
+
</ins><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceTimingInformationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceTimingInformation.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceTimingInformation.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/loader/ResourceTimingInformation.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -24,11 +24,11 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#if ENABLE(WEB_TIMING)
</del><span class="cx"> #include "ResourceTimingInformation.h"
</span><span class="cx">
</span><ins>+#if ENABLE(WEB_TIMING)
+
</ins><span class="cx"> #include "CachedResource.h"
</span><del>-#include "CachedResourceRequest.h"
</del><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Frame.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceTimingInformationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceTimingInformation.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceTimingInformation.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/loader/ResourceTimingInformation.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class CachedResource;
</span><del>-class CachedResourceRequest;
</del><span class="cx"> class Document;
</span><span class="cx"> class Frame;
</span><span class="cx"> class LoadTiming;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -540,8 +540,10 @@
</span><span class="cx"> m_loadTiming.setResponseEnd(responseEndTime);
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><del>- if (m_documentLoader->cachedResourceLoader().document() && RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
- m_documentLoader->cachedResourceLoader().resourceTimingInformation().addResourceTiming(m_resource, *m_documentLoader->cachedResourceLoader().document(), m_resource->loader()->loadTiming());
</del><ins>+ if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) {
+ if (Document* document = m_documentLoader->cachedResourceLoader().document())
+ m_documentLoader->cachedResourceLoader().resourceTimingInformation().addResourceTiming(m_resource, *document, m_resource->loader()->loadTiming());
+ }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> m_state = Finishing;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/Performance.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> entries.appendVector(m_userTiming->getMarks());
</span><span class="cx"> entries.appendVector(m_userTiming->getMeasures());
</span><span class="cx"> }
</span><del>-#endif // ENABLE(USER_TIMING)
</del><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> std::sort(entries.begin(), entries.end(), PerformanceEntry::startTimeCompareLessThan);
</span><span class="cx"> return entries;
</span><span class="lines">@@ -102,10 +102,8 @@
</span><span class="cx"> {
</span><span class="cx"> Vector<RefPtr<PerformanceEntry>> entries;
</span><span class="cx">
</span><del>- if (equalLettersIgnoringASCIICase(entryType, "resource")) {
- for (auto& resource : m_resourceTimingBuffer)
- entries.append(resource);
- }
</del><ins>+ if (equalLettersIgnoringASCIICase(entryType, "resource"))
+ entries.appendVector(m_resourceTimingBuffer);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(USER_TIMING)
</span><span class="cx"> if (m_userTiming) {
</span><span class="lines">@@ -152,6 +150,7 @@
</span><span class="cx"> void Performance::setResourceTimingBufferSize(unsigned size)
</span><span class="cx"> {
</span><span class="cx"> m_resourceTimingBufferSize = size;
</span><ins>+
</ins><span class="cx"> if (isResourceTimingBufferFull())
</span><span class="cx"> dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false));
</span><span class="cx"> }
</span><span class="lines">@@ -169,7 +168,7 @@
</span><span class="cx"> dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Performance::isResourceTimingBufferFull()
</del><ins>+bool Performance::isResourceTimingBufferFull() const
</ins><span class="cx"> {
</span><span class="cx"> return m_resourceTimingBuffer.size() >= m_resourceTimingBufferSize;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/Performance.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> void refEventTarget() final { ref(); }
</span><span class="cx"> void derefEventTarget() final { deref(); }
</span><span class="cx">
</span><del>- bool isResourceTimingBufferFull();
</del><ins>+ bool isResourceTimingBufferFull() const;
</ins><span class="cx">
</span><span class="cx"> mutable RefPtr<PerformanceNavigation> m_navigation;
</span><span class="cx"> mutable RefPtr<PerformanceTiming> m_timing;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMarkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMark.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMark.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceMark.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> bool isMark() const override { return true; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, startTime) { }
</del><ins>+ PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, ASCIILiteral("mark"), startTime, startTime) { }
</ins><span class="cx"> ~PerformanceMark() { }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMeasureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMeasure.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMeasure.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceMeasure.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> bool isMeasure() const override { return true; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, "measure", startTime, duration) { }
</del><ins>+ PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, ASCIILiteral("measure"), startTime, duration) { }
</ins><span class="cx"> ~PerformanceMeasure() { }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceNavigationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceNavigation.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceNavigation.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceNavigation.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -60,4 +60,4 @@
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><del>-#endif // !ENABLE(WEB_TIMING)
</del><ins>+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include "HTTPHeaderNames.h"
</span><span class="cx"> #include "LoadTiming.h"
</span><span class="cx"> #include "URL.h"
</span><del>-#include "ResourceRequest.h"
</del><span class="cx"> #include "ResourceResponse.h"
</span><span class="cx"> #include "SecurityOrigin.h"
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="lines">@@ -77,7 +76,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PerformanceResourceTiming::PerformanceResourceTiming(const AtomicString& initiatorType, const URL& originalURL, const ResourceResponse& response, LoadTiming loadTiming, Document* requestingDocument)
</span><del>- : PerformanceEntry(originalURL.string(), "resource", monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.startTime()), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.responseEnd()))
</del><ins>+ : PerformanceEntry(originalURL.string(), ASCIILiteral("resource"), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.startTime()), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.responseEnd()))
</ins><span class="cx"> , m_initiatorType(initiatorType)
</span><span class="cx"> , m_timing(response.networkLoadTiming())
</span><span class="cx"> , m_loadTiming(loadTiming)
</span><span class="lines">@@ -206,6 +205,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!deltaMilliseconds)
</span><span class="cx"> return 0.0;
</span><ins>+
</ins><span class="cx"> double documentStartTime = m_requestingDocument->loader()->timing().monotonicTimeToZeroBasedDocumentTime(m_loadTiming.fetchStart()) * 1000.0;
</span><span class="cx"> double resourceTimeSeconds = (documentStartTime + deltaMilliseconds) / 1000.0;
</span><span class="cx"> return 1000.0 * Performance::reduceTimeResolution(resourceTimeSeconds);
</span><span class="lines">@@ -212,4 +212,5 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><ins>+
</ins><span class="cx"> #endif // ENABLE(WEB_TIMING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> class Document;
</span><span class="cx"> class URL;
</span><span class="cx"> class NetworkLoadTiming;
</span><del>-class ResourceRequest;
</del><span class="cx"> class ResourceResponse;
</span><span class="cx">
</span><span class="cx"> class PerformanceResourceTiming final : public PerformanceEntry {
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceTiming.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx"> DocumentLoader* PerformanceTiming::documentLoader() const
</span><span class="cx"> {
</span><span class="cx"> if (!m_frame)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> return m_frame->loader().documentLoader();
</span><span class="cx"> }
</span><span class="lines">@@ -315,11 +315,11 @@
</span><span class="cx"> const DocumentTiming* PerformanceTiming::documentTiming() const
</span><span class="cx"> {
</span><span class="cx"> if (!m_frame)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> Document* document = m_frame->document();
</span><span class="cx"> if (!document)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> return &document->timing();
</span><span class="cx"> }
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> {
</span><span class="cx"> DocumentLoader* loader = documentLoader();
</span><span class="cx"> if (!loader)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> return &loader->timing();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.h (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.h        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/page/PerformanceTiming.h        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -81,4 +81,4 @@
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><del>-#endif // !ENABLE(WEB_TIMING)
</del><ins>+#endif // ENABLE(WEB_TIMING)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (211073 => 211074)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2017-01-24 02:30:47 UTC (rev 211073)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2017-01-24 03:12:53 UTC (rev 211074)
</span><span class="lines">@@ -221,6 +221,7 @@
</span><span class="cx"> propertiesDictionary = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, clientProperties));
</span><span class="cx"> else
</span><span class="cx"> propertiesDictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
</span><ins>+
</ins><span class="cx"> #if HAVE(TIMINGDATAOPTIONS)
</span><span class="cx"> int64_t value = static_cast<int64_t>(_TimingDataOptionsEnableW3CNavigationTiming);
</span><span class="cx"> auto enableW3CNavigationTiming = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value));
</span></span></pre>
</div>
</div>
</body>
</html>