<!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>[213384] 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/213384">213384</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2017-03-03 13:50:07 -0800 (Fri, 03 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[URLParser] Fix file: as a relative file URL
https://bugs.webkit.org/show_bug.cgi?id=169122

Reviewed by Tim Horton.

Source/WebCore:

This is clearly defined in https://url.spec.whatwg.org/#file-state with the EOF code point.
I got it wrong and didn't test it.  It's been added to the web platform tests since we last updated.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

LayoutTests:

* TestExpectations:
We don't need to skip url-setters.html any more.  It used to assert before the new URLParser was enabled.
* fast/loader/url-parse-1-expected.txt:
* fast/url/file-expected.txt:
We used to add a strange and unnecessary :/// at the end of the URL.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsfastloaderurlparse1expectedtxt">trunk/LayoutTests/fast/loader/url-parse-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasturlfileexpectedtxt">trunk/LayoutTests/fast/url/file-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformURLParsercpp">trunk/Source/WebCore/platform/URLParser.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreURLParsercpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/LayoutTests/ChangeLog        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-03-03  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        [URLParser] Fix file: as a relative file URL
+        https://bugs.webkit.org/show_bug.cgi?id=169122
+
+        Reviewed by Tim Horton.
+
+        * TestExpectations:
+        We don't need to skip url-setters.html any more.  It used to assert before the new URLParser was enabled.
+        * fast/loader/url-parse-1-expected.txt:
+        * fast/url/file-expected.txt:
+        We used to add a strange and unnecessary :/// at the end of the URL.
+
</ins><span class="cx"> 2017-03-03  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add Debug flag to TestExpectation for webrtc/audio-peer-connection-webaudio.html.
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/LayoutTests/TestExpectations        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -314,8 +314,6 @@
</span><span class="cx"> webkit.org/b/168448 imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-workers.html [ Pass Failure ]
</span><span class="cx"> imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html [ Pass Failure ]
</span><span class="cx"> 
</span><del>-webkit.org/b/161176 [ Debug ] imported/w3c/web-platform-tests/url/url-setters.html [ Skip ]
-
</del><span class="cx"> webkit.org/b/157068 imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html [ Skip ]
</span><span class="cx"> webkit.org/b/157145 imported/w3c/web-platform-tests/fetch/nosniff/stylesheet.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/161312 imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context.html [ Failure Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsfastloaderurlparse1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/loader/url-parse-1-expected.txt (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/loader/url-parse-1-expected.txt        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/LayoutTests/fast/loader/url-parse-1-expected.txt        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> //test        file://test/        test        /
</span><span class="cx"> ///        file:///                /
</span><span class="cx"> ///test        file:///test                /test
</span><del>-file:        file:///BASE/:///                /
</del><ins>+file:        file:///BASE/                /BASE/
</ins><span class="cx"> file:test        file:///BASE/test                /BASE/test
</span><span class="cx"> file:/        file:///                /
</span><span class="cx"> file:/test        file:///test                /test
</span></span></pre></div>
<a id="trunkLayoutTestsfasturlfileexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/url/file-expected.txt (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/url/file-expected.txt        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/LayoutTests/fast/url/file-expected.txt        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> FAIL canonicalize('file:c:\\foo\\bar.html') should be file:///C:/foo/bar.html. Was file:///c:/foo/bar.html.
</span><span class="cx"> FAIL canonicalize('  File:c|////foo\\bar.html') should be file:///C:////foo/bar.html. Was file:///c:////foo/bar.html.
</span><del>-FAIL canonicalize('file:') should be file:///. Was file:///tmp/mock/path:///.
</del><ins>+FAIL canonicalize('file:') should be file:///. Was file:///tmp/mock/path.
</ins><span class="cx"> FAIL canonicalize('file:UNChost/path') should be file://unchost/path. Was file:///tmp/mock/UNChost/path.
</span><span class="cx"> FAIL canonicalize('c:\\foo\\bar') should be file:///C:/foo/bar. Was c:\foo\bar.
</span><span class="cx"> PASS canonicalize('C|/foo/bar') is 'file:///C:/foo/bar'
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/Source/WebCore/ChangeLog        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-03-03  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        [URLParser] Fix file: as a relative file URL
+        https://bugs.webkit.org/show_bug.cgi?id=169122
+
+        Reviewed by Tim Horton.
+
+        This is clearly defined in https://url.spec.whatwg.org/#file-state with the EOF code point.
+        I got it wrong and didn't test it.  It's been added to the web platform tests since we last updated.
+
+        * platform/URLParser.cpp:
+        (WebCore::URLParser::parse):
+
</ins><span class="cx"> 2017-03-03  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Enable fieldsets to be flexboxes, grids and multicolumn.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformURLParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/URLParser.cpp (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/URLParser.cpp        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/Source/WebCore/platform/URLParser.cpp        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -1907,7 +1907,8 @@
</span><span class="cx">         LOG_FINAL_STATE(&quot;File&quot;);
</span><span class="cx">         if (base.isValid() &amp;&amp; base.protocolIs(&quot;file&quot;)) {
</span><span class="cx">             copyURLPartsUntil(base, URLPart::QueryEnd, c, isUTF8Encoding);
</span><del>-            appendToASCIIBuffer(':');
</del><ins>+            m_url.m_fragmentEnd = m_url.m_queryEnd;
+            break;
</ins><span class="cx">         }
</span><span class="cx">         syntaxViolation(c);
</span><span class="cx">         appendToASCIIBuffer(&quot;///&quot;, 3);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/Tools/ChangeLog        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-03-03  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        [URLParser] Fix file: as a relative file URL
+        https://bugs.webkit.org/show_bug.cgi?id=169122
+
+        Reviewed by Tim Horton.
+
+        * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+        (TestWebKitAPI::TEST_F):
+
</ins><span class="cx"> 2017-03-02  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Migrate font-stretch to use fixed-point values
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreURLParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (213383 => 213384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp        2017-03-03 21:38:39 UTC (rev 213383)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp        2017-03-03 21:50:07 UTC (rev 213384)
</span><span class="lines">@@ -579,6 +579,7 @@
</span><span class="cx">     checkRelativeURL(&quot;notspecial://something#&quot;, &quot;file:////var//containers//stuff/&quot;, {&quot;notspecial&quot;, &quot;&quot;, &quot;&quot;, &quot;something&quot;, 0, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;notspecial://something#&quot;}, TestTabs::No);
</span><span class="cx">     checkRelativeURL(&quot;http://something?&quot;, &quot;file:////var//containers//stuff/&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;something&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://something/?&quot;}, TestTabs::No);
</span><span class="cx">     checkRelativeURL(&quot;http://something#&quot;, &quot;file:////var//containers//stuff/&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;something&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://something/#&quot;}, TestTabs::No);
</span><ins>+    checkRelativeURL(&quot;file:&quot;, &quot;file:///path?query#fragment&quot;, {&quot;file&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, 0, &quot;/path&quot;, &quot;query&quot;, &quot;&quot;, &quot;file:///path?query&quot;});
</ins><span class="cx"> 
</span><span class="cx">     // The checking of slashes in SpecialAuthoritySlashes needed to get this to pass contradicts what is in the spec,
</span><span class="cx">     // but it is included in the web platform tests.
</span></span></pre>
</div>
</div>

</body>
</html>