<!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>[169641] releases/WebKitGTK/webkit-2.2</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/169641">169641</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-06-06 00:08:22 -0700 (Fri, 06 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/154727">r154727</a> - [Soup] WebTiming information not shown in the inspector
https://bugs.webkit.org/show_bug.cgi?id=118395

Reviewed by Martin Robinson.

Source/WebCore:

WebTiming information was not correctly provided to WebCore
because the gotHeadersCallback was incorrectly resetting the
original ResourceResponse (which had the ResourceLoadTiming
object) instead of simply updating their contents using the
SoupMessage.

No new test required as this feature is already covered by the
existing webtiming tests. In any case this change includes a fix
for the http/tests/misc/webtiming-ssl.php test which was not
failing even if it should because it was not correct.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::restartedCallback): restartedCallback should be
available only if WEB_TIMING is defined.
(WebCore::createSoupMessageForHandleAndRequest): Ditto.

LayoutTests:

Fixed the webiming-ssl.php test that was incorrectly considering a
FAIL as the expected result. It was probably just a legacy
decision which came from the times where DRT was responsible of
reporting WebTiming information.

Also added a new test that fails due to wkb.ug/103927. It was not
detected before because there were no timing information in the
response.

* http/tests/misc/resources/webtiming-ssl.html:
* http/tests/misc/webtiming-ssl-expected.txt:
* platform/gtk/TestExpectations: added
http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit22LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.2/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit22LayoutTestshttptestsmiscresourceswebtimingsslhtml">releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/resources/webtiming-ssl.html</a></li>
<li><a href="#releasesWebKitGTKwebkit22LayoutTestshttptestsmiscwebtimingsslexpectedtxt">releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/webtiming-ssl-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit22LayoutTestsplatformgtkTestExpectations">releases/WebKitGTK/webkit-2.2/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.2/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit22SourceWebCoreplatformnetworksoupResourceHandleSoupcpp">releases/WebKitGTK/webkit-2.2/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit22LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/LayoutTests/ChangeLog (169640 => 169641)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/LayoutTests/ChangeLog        2014-06-06 06:53:15 UTC (rev 169640)
+++ releases/WebKitGTK/webkit-2.2/LayoutTests/ChangeLog        2014-06-06 07:08:22 UTC (rev 169641)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2013-08-28  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [Soup] WebTiming information not shown in the inspector
+        https://bugs.webkit.org/show_bug.cgi?id=118395
+
+        Reviewed by Martin Robinson.
+
+        Fixed the webiming-ssl.php test that was incorrectly considering a
+        FAIL as the expected result. It was probably just a legacy
+        decision which came from the times where DRT was responsible of
+        reporting WebTiming information.
+
+        Also added a new test that fails due to wkb.ug/103927. It was not
+        detected before because there were no timing information in the
+        response.
+
+        * http/tests/misc/resources/webtiming-ssl.html:
+        * http/tests/misc/webtiming-ssl-expected.txt:
+        * platform/gtk/TestExpectations: added
+        http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html.
+
</ins><span class="cx"> 2014-03-21  Oliver Hunt  &lt;oliver@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix semantics of JS execution when assigning an object to document.location
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22LayoutTestshttptestsmiscresourceswebtimingsslhtml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/resources/webtiming-ssl.html (169640 => 169641)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/resources/webtiming-ssl.html        2014-06-06 06:53:15 UTC (rev 169640)
+++ releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/resources/webtiming-ssl.html        2014-06-06 07:08:22 UTC (rev 169641)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span><span class="cx"> &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-description(&quot;This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd. Note that DumpRenderTree doesn't set secureConnectionStart.&quot;);
</del><ins>+description(&quot;This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd.&quot;);
</ins><span class="cx"> 
</span><span class="cx"> window.performance = window.performance || {};
</span><span class="cx"> var navigation = performance.navigation || {};
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22LayoutTestshttptestsmiscwebtimingsslexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/webtiming-ssl-expected.txt (169640 => 169641)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/webtiming-ssl-expected.txt        2014-06-06 06:53:15 UTC (rev 169640)
+++ releases/WebKitGTK/webkit-2.2/LayoutTests/http/tests/misc/webtiming-ssl-expected.txt        2014-06-06 07:08:22 UTC (rev 169641)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><del>-This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd. Note that DumpRenderTree doesn't set secureConnectionStart.
</del><ins>+This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd.
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS timing.connectStart is &gt;= timing.navigationStart
</span><del>-FAIL timing.secureConnectionStart should be &gt;= timing.connectStart. Was 0 (of type number).
</del><ins>+PASS timing.secureConnectionStart is &gt;= timing.connectStart
</ins><span class="cx"> PASS timing.connectEnd is &gt;= timing.secureConnectionStart
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22LayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/LayoutTests/platform/gtk/TestExpectations (169640 => 169641)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/LayoutTests/platform/gtk/TestExpectations        2014-06-06 06:53:15 UTC (rev 169640)
+++ releases/WebKitGTK/webkit-2.2/LayoutTests/platform/gtk/TestExpectations        2014-06-06 07:08:22 UTC (rev 169641)
</span><span class="lines">@@ -1237,6 +1237,7 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html [ Failure ]
</span><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html [ Failure ]
</span><ins>+webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html [ Failure ]
</ins><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_frame_initiator_type.html [ Failure ]
</span><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_initiator_types.html [ Failure ]
</span><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_redirects.html [ Failure ]
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Source/WebCore/ChangeLog (169640 => 169641)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebCore/ChangeLog        2014-06-06 06:53:15 UTC (rev 169640)
+++ releases/WebKitGTK/webkit-2.2/Source/WebCore/ChangeLog        2014-06-06 07:08:22 UTC (rev 169641)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2013-08-28  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [Soup] WebTiming information not shown in the inspector
+        https://bugs.webkit.org/show_bug.cgi?id=118395
+
+        Reviewed by Martin Robinson.
+
+        WebTiming information was not correctly provided to WebCore
+        because the gotHeadersCallback was incorrectly resetting the
+        original ResourceResponse (which had the ResourceLoadTiming
+        object) instead of simply updating their contents using the
+        SoupMessage.
+
+        No new test required as this feature is already covered by the
+        existing webtiming tests. In any case this change includes a fix
+        for the http/tests/misc/webtiming-ssl.php test which was not
+        failing even if it should because it was not correct.
+
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::gotHeadersCallback):
+        (WebCore::restartedCallback): restartedCallback should be
+        available only if WEB_TIMING is defined.
+        (WebCore::createSoupMessageForHandleAndRequest): Ditto.
+
</ins><span class="cx"> 2014-03-26  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r162679): Poster image visible under the video
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit22SourceWebCoreplatformnetworksoupResourceHandleSoupcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.2/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (169640 => 169641)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.2/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2014-06-06 06:53:15 UTC (rev 169640)
+++ releases/WebKitGTK/webkit-2.2/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2014-06-06 07:08:22 UTC (rev 169641)
</span><span class="lines">@@ -352,9 +352,7 @@
</span><span class="cx"> 
</span><span class="cx">     // The original response will be needed later to feed to willSendRequest in
</span><span class="cx">     // doRedirect() in case we are redirected. For this reason, we store it here.
</span><del>-    ResourceResponse response;
-    response.updateFromSoupMessage(message);
-    d-&gt;m_response = response;
</del><ins>+    d-&gt;m_response.updateFromSoupMessage(message);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void applyAuthenticationToRequest(ResourceHandle* handle, ResourceRequest&amp; request, bool redirect)
</span><span class="lines">@@ -393,6 +391,7 @@
</span><span class="cx">     request.setURL(urlWithCredentials);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEB_TIMING)
</ins><span class="cx"> // Called each time the message is going to be sent again except the first time.
</span><span class="cx"> // This happens when libsoup handles HTTP authentication.
</span><span class="cx"> static void restartedCallback(SoupMessage*, gpointer data)
</span><span class="lines">@@ -401,13 +400,12 @@
</span><span class="cx">     if (!handle || handle-&gt;cancelledOrClientless())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-#if ENABLE(WEB_TIMING)
</del><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><span class="cx">     redirectResponse.resourceLoadTiming()-&gt;requestTime = monotonicallyIncreasingTime();
</span><del>-#endif
</del><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> static bool shouldRedirect(ResourceHandle* handle)
</span><span class="cx"> {
</span><span class="lines">@@ -974,7 +972,6 @@
</span><span class="cx">         soup_message_headers_set_content_length(soupMessage-&gt;request_headers, 0);
</span><span class="cx"> 
</span><span class="cx">     g_signal_connect(d-&gt;m_soupMessage.get(), &quot;got-headers&quot;, G_CALLBACK(gotHeadersCallback), handle);
</span><del>-    g_signal_connect(d-&gt;m_soupMessage.get(), &quot;restarted&quot;, G_CALLBACK(restartedCallback), handle);
</del><span class="cx">     g_signal_connect(d-&gt;m_soupMessage.get(), &quot;wrote-body-data&quot;, G_CALLBACK(wroteBodyDataCallback), handle);
</span><span class="cx"> 
</span><span class="cx">     soup_message_set_flags(d-&gt;m_soupMessage.get(), static_cast&lt;SoupMessageFlags&gt;(soup_message_get_flags(d-&gt;m_soupMessage.get()) | SOUP_MESSAGE_NO_REDIRECT));
</span><span class="lines">@@ -982,6 +979,7 @@
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</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><ins>+    g_signal_connect(d-&gt;m_soupMessage.get(), &quot;restarted&quot;, G_CALLBACK(restartedCallback), handle);
</ins><span class="cx">     g_signal_connect(d-&gt;m_soupMessage.get(), &quot;wrote-body&quot;, G_CALLBACK(wroteBodyCallback), handle);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>