<!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 &lt;pecoraro@apple.com&gt; 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  &lt;pecoraro@apple.com&gt;
+
+        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  &lt;achristensen@webkit.org&gt;
</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 &quot;config.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><ins>+
</ins><span class="cx"> #include &quot;JSPerformanceEntry.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><del>-#if ENABLE(USER_TIMING)
-#include &quot;JSPerformanceMark.h&quot;
-#include &quot;JSPerformanceMeasure.h&quot;
-#endif
</del><span class="cx"> #include &quot;JSPerformanceResourceTiming.h&quot;
</span><span class="cx"> #include &quot;PerformanceMark.h&quot;
</span><span class="cx"> #include &quot;PerformanceMeasure.h&quot;
</span><span class="cx"> #include &quot;PerformanceResourceTiming.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(USER_TIMING)
+#include &quot;JSPerformanceMark.h&quot;
+#include &quot;JSPerformanceMeasure.h&quot;
+#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 &quot;config.h&quot;
</span><del>-#if ENABLE(WEB_TIMING)
</del><span class="cx"> #include &quot;ResourceTimingInformation.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEB_TIMING)
+
</ins><span class="cx"> #include &quot;CachedResource.h&quot;
</span><del>-#include &quot;CachedResourceRequest.h&quot;
</del><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</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-&gt;cachedResourceLoader().document() &amp;&amp; RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
-        m_documentLoader-&gt;cachedResourceLoader().resourceTimingInformation().addResourceTiming(m_resource, *m_documentLoader-&gt;cachedResourceLoader().document(), m_resource-&gt;loader()-&gt;loadTiming());
</del><ins>+    if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) {
+        if (Document* document = m_documentLoader-&gt;cachedResourceLoader().document())
+            m_documentLoader-&gt;cachedResourceLoader().resourceTimingInformation().addResourceTiming(m_resource, *document, m_resource-&gt;loader()-&gt;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-&gt;getMarks());
</span><span class="cx">         entries.appendVector(m_userTiming-&gt;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&lt;RefPtr&lt;PerformanceEntry&gt;&gt; entries;
</span><span class="cx"> 
</span><del>-    if (equalLettersIgnoringASCIICase(entryType, &quot;resource&quot;)) {
-        for (auto&amp; resource : m_resourceTimingBuffer)
-            entries.append(resource);
-    }
</del><ins>+    if (equalLettersIgnoringASCIICase(entryType, &quot;resource&quot;))
+        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() &gt;= 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&lt;PerformanceNavigation&gt; m_navigation;
</span><span class="cx">     mutable RefPtr&lt;PerformanceTiming&gt; 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&amp; name, double startTime) : PerformanceEntry(name, &quot;mark&quot;, startTime, startTime) { }
</del><ins>+    PerformanceMark(const String&amp; name, double startTime) : PerformanceEntry(name, ASCIILiteral(&quot;mark&quot;), 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&amp; name, double startTime, double duration) : PerformanceEntry(name, &quot;measure&quot;, startTime, duration) { }
</del><ins>+    PerformanceMeasure(const String&amp; name, double startTime, double duration) : PerformanceEntry(name, ASCIILiteral(&quot;measure&quot;), 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 &quot;HTTPHeaderNames.h&quot;
</span><span class="cx"> #include &quot;LoadTiming.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><del>-#include &quot;ResourceRequest.h&quot;
</del><span class="cx"> #include &quot;ResourceResponse.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="lines">@@ -77,7 +76,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PerformanceResourceTiming::PerformanceResourceTiming(const AtomicString&amp; initiatorType, const URL&amp; originalURL, const ResourceResponse&amp; response, LoadTiming loadTiming, Document* requestingDocument)
</span><del>-    : PerformanceEntry(originalURL.string(), &quot;resource&quot;, monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.startTime()), monotonicTimeToDocumentMilliseconds(requestingDocument, loadTiming.responseEnd()))
</del><ins>+    : PerformanceEntry(originalURL.string(), ASCIILiteral(&quot;resource&quot;), 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-&gt;loader()-&gt;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-&gt;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-&gt;document();
</span><span class="cx">     if (!document)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     return &amp;document-&gt;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 &amp;loader-&gt;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, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</span><ins>+
</ins><span class="cx"> #if HAVE(TIMINGDATAOPTIONS)
</span><span class="cx">     int64_t value = static_cast&lt;int64_t&gt;(_TimingDataOptionsEnableW3CNavigationTiming);
</span><span class="cx">     auto enableW3CNavigationTiming = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &amp;value));
</span></span></pre>
</div>
</div>

</body>
</html>