<!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>[207795] 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/207795">207795</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-10-24 18:31:42 -0700 (Mon, 24 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>URLParser should match old URL::parse with %2E in path
https://bugs.webkit.org/show_bug.cgi?id=163929
Reviewed by Alexey Proskuryakov.
LayoutTests/imported/w3c:
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:
Source/WebCore:
Covered by updated API tests, which show that URLParser now matches URL::parse in these cases.
Also covered by newly failing web platform tests, which were failing before URLParser was enabled.
If https://github.com/whatwg/url/issues/87 is resolved we can change behavior to match.
* platform/URLParser.cpp:
(WebCore::URLParser::isSingleDotPathSegment):
(WebCore::URLParser::isDoubleDotPathSegment):
(WebCore::URLParser::consumeSingleDotPathSegment):
(WebCore::URLParser::consumeDoubleDotPathSegment):
(WebCore::URLParser::parse):
(WebCore::URLParser::isPercentEncodedDot): Deleted.
Tools:
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
LayoutTests:
* fast/url/path-expected.txt:
* fast/url/standard-url-expected.txt:
* fetch/fetch-url-serialization-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasturlpathexpectedtxt">trunk/LayoutTests/fast/url/path-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasturlstandardurlexpectedtxt">trunk/LayoutTests/fast/url/standard-url-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfetchfetchurlserializationexpectedtxt">trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-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 (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/ChangeLog        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-10-24 Alex Christensen <achristensen@webkit.org>
+
+ URLParser should match old URL::parse with %2E in path
+ https://bugs.webkit.org/show_bug.cgi?id=163929
+
+ Reviewed by Alexey Proskuryakov.
+
+ * fast/url/path-expected.txt:
+ * fast/url/standard-url-expected.txt:
+ * fetch/fetch-url-serialization-expected.txt:
+
</ins><span class="cx"> 2016-10-24 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> IndexedDB 2.0: Support new IDBKeyRange interfaces.
</span></span></pre></div>
<a id="trunkLayoutTestsfasturlpathexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/url/path-expected.txt (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/url/path-expected.txt        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/fast/url/path-expected.txt        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -14,9 +14,9 @@
</span><span class="cx"> PASS canonicalize('http://example.com/foo/bar/../ton/../../a') is 'http://example.com/a'
</span><span class="cx"> PASS canonicalize('http://example.com/foo/../../..') is 'http://example.com/'
</span><span class="cx"> PASS canonicalize('http://example.com/foo/../../../ton') is 'http://example.com/ton'
</span><del>-PASS canonicalize('http://example.com/foo/%2e') is 'http://example.com/foo/'
-PASS canonicalize('http://example.com/foo/%2e%2') is 'http://example.com/foo/.%2'
-PASS canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') is 'http://example.com/..bar'
</del><ins>+FAIL canonicalize('http://example.com/foo/%2e') should be http://example.com/foo/. Was http://example.com/foo/%2e.
+FAIL canonicalize('http://example.com/foo/%2e%2') should be http://example.com/foo/.%2. Was http://example.com/foo/%2e%2.
+FAIL canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') should be http://example.com/..bar. Was http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar.
</ins><span class="cx"> PASS canonicalize('http://example.com////../..') is 'http://example.com//'
</span><span class="cx"> PASS canonicalize('http://example.com/foo/bar//../..') is 'http://example.com/foo/'
</span><span class="cx"> PASS canonicalize('http://example.com/foo/bar//..') is 'http://example.com/foo/bar/'
</span></span></pre></div>
<a id="trunkLayoutTestsfasturlstandardurlexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/url/standard-url-expected.txt (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/url/standard-url-expected.txt        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/fast/url/standard-url-expected.txt        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> PASS canonicalize('http://www.google.com') is 'http://www.google.com/'
</span><span class="cx"> PASS canonicalize('http:////////user:@google.com:99?foo') is 'http://user@google.com:99/?foo'
</span><span class="cx"> PASS canonicalize('http://192.0x00A80001') is 'http://192.168.0.1/'
</span><del>-PASS canonicalize('http://www/foo%2Ehtml') is 'http://www/foo.html'
</del><ins>+FAIL canonicalize('http://www/foo%2Ehtml') should be http://www/foo.html. Was http://www/foo%2Ehtml.
</ins><span class="cx"> PASS canonicalize('http://user:pass@/') is 'http://user:pass@/'
</span><span class="cx"> PASS canonicalize('http://%25DOMAIN:foobar@foodomain.com/') is 'http://%25DOMAIN:foobar@foodomain.com/'
</span><span class="cx"> PASS canonicalize('http:\\\\www.google.com\\foo') is 'http://www.google.com/foo'
</span></span></pre></div>
<a id="trunkLayoutTestsfetchfetchurlserializationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -123,9 +123,9 @@
</span><span class="cx"> PASS Testing Request url 'http://example.com/foo/bar/../ton/../../a' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://example.com/foo/../../..' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://example.com/foo/../../../ton' with base 'about:blank'
</span><del>-PASS Testing Request url 'http://example.com/foo/%2e' with base 'about:blank'
-PASS Testing Request url 'http://example.com/foo/%2e%2' with base 'about:blank'
-PASS Testing Request url 'http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar' with base 'about:blank'
</del><ins>+FAIL Testing Request url 'http://example.com/foo/%2e' with base 'about:blank' assert_equals: expected "http://example.com/foo/" but got "http://example.com/foo/%2e"
+FAIL Testing Request url 'http://example.com/foo/%2e%2' with base 'about:blank' assert_equals: expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2"
+FAIL Testing Request url 'http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar' with base 'about:blank' assert_equals: expected "http://example.com/..bar" but got "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"
</ins><span class="cx"> PASS Testing Request url 'http://example.com////../..' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://example.com/foo/bar//../..' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://example.com/foo/bar//..' with base 'about:blank'
</span><span class="lines">@@ -154,8 +154,8 @@
</span><span class="cx"> PASS Testing Request url 'http://[www.google.com]/' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://www.google.com' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://192.0x00A80001' with base 'about:blank'
</span><del>-PASS Testing Request url 'http://www/foo%2Ehtml' with base 'about:blank'
-PASS Testing Request url 'http://www/foo/%2E/html' with base 'about:blank'
</del><ins>+FAIL Testing Request url 'http://www/foo%2Ehtml' with base 'about:blank' assert_equals: expected "http://www/foo.html" but got "http://www/foo%2Ehtml"
+FAIL Testing Request url 'http://www/foo/%2E/html' with base 'about:blank' assert_equals: expected "http://www/foo/html" but got "http://www/foo/%2E/html"
</ins><span class="cx"> PASS Testing Request url 'http://user:pass@/' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http://%25DOMAIN:foobar@foodomain.com/' with base 'about:blank'
</span><span class="cx"> PASS Testing Request url 'http:\\www.google.com\foo' with base 'about:blank'
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-10-24 Alex Christensen <achristensen@webkit.org>
+
+ URLParser should match old URL::parse with %2E in path
+ https://bugs.webkit.org/show_bug.cgi?id=163929
+
+ Reviewed by Alexey Proskuryakov.
+
+ * web-platform-tests/url/a-element-expected.txt:
+ * web-platform-tests/url/a-element-xhtml-expected.txt:
+ * web-platform-tests/url/url-constructor-expected.txt:
+
</ins><span class="cx"> 2016-10-21 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> URL::port should return Optional<uint16_t>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -126,9 +126,9 @@
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar/../ton/../../a> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/../../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/../../../ton> against <about:blank>
</span><del>-PASS Parsing: <http://example.com/foo/%2e> against <about:blank>
-PASS Parsing: <http://example.com/foo/%2e%2> against <about:blank>
-PASS Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>
</del><ins>+FAIL Parsing: <http://example.com/foo/%2e> against <about:blank> assert_equals: href expected "http://example.com/foo/" but got "http://example.com/foo/%2e"
+FAIL Parsing: <http://example.com/foo/%2e%2> against <about:blank> assert_equals: href expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2"
+FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"
</ins><span class="cx"> PASS Parsing: <http://example.com////../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar//../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar//..> against <about:blank>
</span><span class="lines">@@ -157,8 +157,8 @@
</span><span class="cx"> PASS Parsing: <http://[www.google.com]/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://www.google.com> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://192.0x00A80001> against <about:blank>
</span><del>-PASS Parsing: <http://www/foo%2Ehtml> against <about:blank>
-PASS Parsing: <http://www/foo/%2E/html> against <about:blank>
</del><ins>+FAIL Parsing: <http://www/foo%2Ehtml> against <about:blank> assert_equals: href expected "http://www/foo.html" but got "http://www/foo%2Ehtml"
+FAIL Parsing: <http://www/foo/%2E/html> against <about:blank> assert_equals: href expected "http://www/foo/html" but got "http://www/foo/%2E/html"
</ins><span class="cx"> PASS Parsing: <http://user:pass@/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http:\\www.google.com\foo> against <about:blank>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -126,9 +126,9 @@
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar/../ton/../../a> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/../../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/../../../ton> against <about:blank>
</span><del>-PASS Parsing: <http://example.com/foo/%2e> against <about:blank>
-PASS Parsing: <http://example.com/foo/%2e%2> against <about:blank>
-PASS Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>
</del><ins>+FAIL Parsing: <http://example.com/foo/%2e> against <about:blank> assert_equals: href expected "http://example.com/foo/" but got "http://example.com/foo/%2e"
+FAIL Parsing: <http://example.com/foo/%2e%2> against <about:blank> assert_equals: href expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2"
+FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"
</ins><span class="cx"> PASS Parsing: <http://example.com////../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar//../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar//..> against <about:blank>
</span><span class="lines">@@ -157,8 +157,8 @@
</span><span class="cx"> PASS Parsing: <http://[www.google.com]/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://www.google.com> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://192.0x00A80001> against <about:blank>
</span><del>-PASS Parsing: <http://www/foo%2Ehtml> against <about:blank>
-PASS Parsing: <http://www/foo/%2E/html> against <about:blank>
</del><ins>+FAIL Parsing: <http://www/foo%2Ehtml> against <about:blank> assert_equals: href expected "http://www/foo.html" but got "http://www/foo%2Ehtml"
+FAIL Parsing: <http://www/foo/%2E/html> against <about:blank> assert_equals: href expected "http://www/foo/html" but got "http://www/foo/%2E/html"
</ins><span class="cx"> PASS Parsing: <http://user:pass@/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http:\\www.google.com\foo> against <about:blank>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -130,9 +130,9 @@
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar/../ton/../../a> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/../../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/../../../ton> against <about:blank>
</span><del>-PASS Parsing: <http://example.com/foo/%2e> against <about:blank>
-PASS Parsing: <http://example.com/foo/%2e%2> against <about:blank>
-PASS Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>
</del><ins>+FAIL Parsing: <http://example.com/foo/%2e> against <about:blank> assert_equals: href expected "http://example.com/foo/" but got "http://example.com/foo/%2e"
+FAIL Parsing: <http://example.com/foo/%2e%2> against <about:blank> assert_equals: href expected "http://example.com/foo/.%2" but got "http://example.com/foo/%2e%2"
+FAIL Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank> assert_equals: href expected "http://example.com/..bar" but got "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"
</ins><span class="cx"> PASS Parsing: <http://example.com////../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar//../..> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://example.com/foo/bar//..> against <about:blank>
</span><span class="lines">@@ -161,8 +161,8 @@
</span><span class="cx"> PASS Parsing: <http://[www.google.com]/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://www.google.com> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://192.0x00A80001> against <about:blank>
</span><del>-PASS Parsing: <http://www/foo%2Ehtml> against <about:blank>
-PASS Parsing: <http://www/foo/%2E/html> against <about:blank>
</del><ins>+FAIL Parsing: <http://www/foo%2Ehtml> against <about:blank> assert_equals: href expected "http://www/foo.html" but got "http://www/foo%2Ehtml"
+FAIL Parsing: <http://www/foo/%2E/html> against <about:blank> assert_equals: href expected "http://www/foo/html" but got "http://www/foo/%2E/html"
</ins><span class="cx"> PASS Parsing: <http://user:pass@/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank>
</span><span class="cx"> PASS Parsing: <http:\\www.google.com\foo> against <about:blank>
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/Source/WebCore/ChangeLog        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-10-24 Alex Christensen <achristensen@webkit.org>
+
+ URLParser should match old URL::parse with %2E in path
+ https://bugs.webkit.org/show_bug.cgi?id=163929
+
+ Reviewed by Alexey Proskuryakov.
+
+ Covered by updated API tests, which show that URLParser now matches URL::parse in these cases.
+ Also covered by newly failing web platform tests, which were failing before URLParser was enabled.
+ If https://github.com/whatwg/url/issues/87 is resolved we can change behavior to match.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::isSingleDotPathSegment):
+ (WebCore::URLParser::isDoubleDotPathSegment):
+ (WebCore::URLParser::consumeSingleDotPathSegment):
+ (WebCore::URLParser::consumeDoubleDotPathSegment):
+ (WebCore::URLParser::parse):
+ (WebCore::URLParser::isPercentEncodedDot): Deleted.
+
</ins><span class="cx"> 2016-10-24 Per Arne Vollan <pvollan@apple.com>
</span><span class="cx">
</span><span class="cx"> [Win] CMake build type is not set.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformURLParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/URLParser.cpp (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/URLParser.cpp        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/Source/WebCore/platform/URLParser.cpp        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -891,27 +891,7 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static const char* dotASCIICode = "2e";
-
</del><span class="cx"> template<typename CharacterType>
</span><del>-ALWAYS_INLINE bool URLParser::isPercentEncodedDot(CodePointIterator<CharacterType> c)
-{
- if (c.atEnd())
- return false;
- if (*c != '%')
- return false;
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- if (c.atEnd())
- return false;
- if (*c != dotASCIICode[0])
- return false;
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- if (c.atEnd())
- return false;
- return toASCIILower(*c) == dotASCIICode[1];
-}
-
-template<typename CharacterType>
</del><span class="cx"> ALWAYS_INLINE bool URLParser::isSingleDotPathSegment(CodePointIterator<CharacterType> c)
</span><span class="cx"> {
</span><span class="cx"> if (c.atEnd())
</span><span class="lines">@@ -920,18 +900,6 @@
</span><span class="cx"> advance<CharacterType, ReportSyntaxViolation::No>(c);
</span><span class="cx"> return c.atEnd() || isSlashQuestionOrHash(*c);
</span><span class="cx"> }
</span><del>- if (*c != '%')
- return false;
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- if (c.atEnd() || *c != dotASCIICode[0])
- return false;
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- if (c.atEnd())
- return false;
- if (toASCIILower(*c) == dotASCIICode[1]) {
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- return c.atEnd() || isSlashQuestionOrHash(*c);
- }
</del><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -944,18 +912,6 @@
</span><span class="cx"> advance<CharacterType, ReportSyntaxViolation::No>(c);
</span><span class="cx"> return isSingleDotPathSegment(c);
</span><span class="cx"> }
</span><del>- if (*c != '%')
- return false;
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- if (c.atEnd() || *c != dotASCIICode[0])
- return false;
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- if (c.atEnd())
- return false;
- if (toASCIILower(*c) == dotASCIICode[1]) {
- advance<CharacterType, ReportSyntaxViolation::No>(c);
- return isSingleDotPathSegment(c);
- }
</del><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -963,27 +919,12 @@
</span><span class="cx"> void URLParser::consumeSingleDotPathSegment(CodePointIterator<CharacterType>& c)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isSingleDotPathSegment(c));
</span><del>- if (*c == '.') {
- advance(c);
- if (!c.atEnd()) {
- if (*c == '/' || *c == '\\')
- advance(c);
- else
- ASSERT(*c == '?' || *c == '#');
- }
- } else {
- ASSERT(*c == '%');
- advance(c);
- ASSERT(*c == dotASCIICode[0]);
- advance(c);
- ASSERT(toASCIILower(*c) == dotASCIICode[1]);
- advance(c);
- if (!c.atEnd()) {
- if (*c == '/' || *c == '\\')
- advance(c);
- else
- ASSERT(*c == '?' || *c == '#');
- }
</del><ins>+ advance(c);
+ if (!c.atEnd()) {
+ if (*c == '/' || *c == '\\')
+ advance(c);
+ else
+ ASSERT(*c == '?' || *c == '#');
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -991,16 +932,7 @@
</span><span class="cx"> void URLParser::consumeDoubleDotPathSegment(CodePointIterator<CharacterType>& c)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isDoubleDotPathSegment(c));
</span><del>- if (*c == '.')
- advance(c);
- else {
- ASSERT(*c == '%');
- advance(c);
- ASSERT(*c == dotASCIICode[0]);
- advance(c);
- ASSERT(toASCIILower(*c) == dotASCIICode[1]);
- advance(c);
- }
</del><ins>+ advance(c);
</ins><span class="cx"> consumeSingleDotPathSegment(c);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1723,17 +1655,6 @@
</span><span class="cx"> state = State::Fragment;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- if (UNLIKELY(isPercentEncodedDot(c))) {
- syntaxViolation(c);
- appendToASCIIBuffer('.');
- ASSERT(*c == '%');
- advance(c);
- ASSERT(*c == dotASCIICode[0]);
- advance(c);
- ASSERT(toASCIILower(*c) == dotASCIICode[1]);
- advance(c);
- break;
- }
</del><span class="cx"> utf8PercentEncode<isInDefaultEncodeSet>(c);
</span><span class="cx"> ++c;
</span><span class="cx"> break;
</span><span class="lines">@@ -2868,6 +2789,8 @@
</span><span class="cx">
</span><span class="cx"> bool URLParser::enabled()
</span><span class="cx"> {
</span><ins>+ return true;
+ /*
</ins><span class="cx"> if (urlParserEnabled == URLParserEnabled::Undetermined) {
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> urlParserEnabled = MacApplication::isSafari() ? URLParserEnabled::Yes : URLParserEnabled::No;
</span><span class="lines">@@ -2878,6 +2801,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> return urlParserEnabled == URLParserEnabled::Yes;
</span><ins>+ */
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/Tools/ChangeLog        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-10-24 Alex Christensen <achristensen@webkit.org>
+
+ URLParser should match old URL::parse with %2E in path
+ https://bugs.webkit.org/show_bug.cgi?id=163929
+
+ Reviewed by Alexey Proskuryakov.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
</ins><span class="cx"> 2016-10-21 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> URL::port should return Optional<uint16_t>
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreURLParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (207794 => 207795)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp        2016-10-25 00:45:03 UTC (rev 207794)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp        2016-10-25 01:31:42 UTC (rev 207795)
</span><span class="lines">@@ -596,42 +596,18 @@
</span><span class="cx"> checkURLDifferences("http://127.0.0.01/",
</span><span class="cx"> {"http", "", "", "127.0.0.1", 0, "/", "", "", "http://127.0.0.1/"},
</span><span class="cx"> {"http", "", "", "127.0.0.01", 0, "/", "", "", "http://127.0.0.01/"});
</span><del>- checkURLDifferences("http://example.com/path1/.%2e",
- {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"},
- {"http", "", "", "example.com", 0, "/path1/.%2e", "", "", "http://example.com/path1/.%2e"});
- checkURLDifferences("http://example.com/path1/.%2E",
- {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"},
- {"http", "", "", "example.com", 0, "/path1/.%2E", "", "", "http://example.com/path1/.%2E"});
- checkURLDifferences("http://example.com/path1/.%2E/",
- {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"},
- {"http", "", "", "example.com", 0, "/path1/.%2E/", "", "", "http://example.com/path1/.%2E/"});
- checkURLDifferences("http://example.com/path1/%2e.",
- {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"},
- {"http", "", "", "example.com", 0, "/path1/%2e.", "", "", "http://example.com/path1/%2e."});
- checkURLDifferences("http://example.com/path1/%2E%2e",
- {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"},
- {"http", "", "", "example.com", 0, "/path1/%2E%2e", "", "", "http://example.com/path1/%2E%2e"});
- checkURLDifferences("http://example.com/path1/%2e",
- {"http", "", "", "example.com", 0, "/path1/", "", "", "http://example.com/path1/"},
- {"http", "", "", "example.com", 0, "/path1/%2e", "", "", "http://example.com/path1/%2e"});
- checkURLDifferences("http://example.com/path1/%2E",
- {"http", "", "", "example.com", 0, "/path1/", "", "", "http://example.com/path1/"},
- {"http", "", "", "example.com", 0, "/path1/%2E", "", "", "http://example.com/path1/%2E"});
- checkURLDifferences("http://example.com/path1/%2E/",
- {"http", "", "", "example.com", 0, "/path1/", "", "", "http://example.com/path1/"},
- {"http", "", "", "example.com", 0, "/path1/%2E/", "", "", "http://example.com/path1/%2E/"});
- checkURLDifferences("http://example.com/path1/path2/%2e?query",
- {"http", "", "", "example.com", 0, "/path1/path2/", "query", "", "http://example.com/path1/path2/?query"},
- {"http", "", "", "example.com", 0, "/path1/path2/%2e", "query", "", "http://example.com/path1/path2/%2e?query"});
- checkURLDifferences("http://example.com/path1/path2/%2e%2e?query",
- {"http", "", "", "example.com", 0, "/path1/", "query", "", "http://example.com/path1/?query"},
- {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "query", "", "http://example.com/path1/path2/%2e%2e?query"});
- checkURLDifferences("http://example.com/path1/path2/%2e#fragment",
- {"http", "", "", "example.com", 0, "/path1/path2/", "", "fragment", "http://example.com/path1/path2/#fragment"},
- {"http", "", "", "example.com", 0, "/path1/path2/%2e", "", "fragment", "http://example.com/path1/path2/%2e#fragment"});
- checkURLDifferences("http://example.com/path1/path2/%2e%2e#fragment",
- {"http", "", "", "example.com", 0, "/path1/", "", "fragment", "http://example.com/path1/#fragment"},
- {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "", "fragment", "http://example.com/path1/path2/%2e%2e#fragment"});
</del><ins>+ checkURL("http://example.com/path1/.%2e", {"http", "", "", "example.com", 0, "/path1/.%2e", "", "", "http://example.com/path1/.%2e"});
+ checkURL("http://example.com/path1/.%2E", {"http", "", "", "example.com", 0, "/path1/.%2E", "", "", "http://example.com/path1/.%2E"});
+ checkURL("http://example.com/path1/.%2E/", {"http", "", "", "example.com", 0, "/path1/.%2E/", "", "", "http://example.com/path1/.%2E/"});
+ checkURL("http://example.com/path1/%2e.", {"http", "", "", "example.com", 0, "/path1/%2e.", "", "", "http://example.com/path1/%2e."});
+ checkURL("http://example.com/path1/%2E%2e", {"http", "", "", "example.com", 0, "/path1/%2E%2e", "", "", "http://example.com/path1/%2E%2e"});
+ checkURL("http://example.com/path1/%2e", {"http", "", "", "example.com", 0, "/path1/%2e", "", "", "http://example.com/path1/%2e"});
+ checkURL("http://example.com/path1/%2E", {"http", "", "", "example.com", 0, "/path1/%2E", "", "", "http://example.com/path1/%2E"});
+ checkURL("http://example.com/path1/%2E/", {"http", "", "", "example.com", 0, "/path1/%2E/", "", "", "http://example.com/path1/%2E/"});
+ checkURL("http://example.com/path1/path2/%2e?query", {"http", "", "", "example.com", 0, "/path1/path2/%2e", "query", "", "http://example.com/path1/path2/%2e?query"});
+ checkURL("http://example.com/path1/path2/%2e%2e?query", {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "query", "", "http://example.com/path1/path2/%2e%2e?query"});
+ checkURL("http://example.com/path1/path2/%2e#fragment", {"http", "", "", "example.com", 0, "/path1/path2/%2e", "", "fragment", "http://example.com/path1/path2/%2e#fragment"});
+ checkURL("http://example.com/path1/path2/%2e%2e#fragment", {"http", "", "", "example.com", 0, "/path1/path2/%2e%2e", "", "fragment", "http://example.com/path1/path2/%2e%2e#fragment"});
</ins><span class="cx"> checkURLDifferences("file://[0:a:0:0:b:c:0:0]/path",
</span><span class="cx"> {"file", "", "", "[0:a::b:c:0:0]", 0, "/path", "", "", "file://[0:a::b:c:0:0]/path"},
</span><span class="cx"> {"file", "", "", "[0:a:0:0:b:c:0:0]", 0, "/path", "", "", "file://[0:a:0:0:b:c:0:0]/path"});
</span><span class="lines">@@ -734,10 +710,9 @@
</span><span class="cx"> checkURLDifferences(utf16String(u"http://0Xc0.0250.01"),
</span><span class="cx"> {"http", "", "", "192.168.0.1", 0, "/", "", "", "http://192.168.0.1/"},
</span><span class="cx"> {"http", "", "", "0xc0.0250.01", 0, "/", "", "", "http://0xc0.0250.01/"});
</span><del>- checkURLDifferences("http://host/path%2e.%2E",
- {"http", "", "", "host", 0, "/path...", "", "", "http://host/path..."},
- {"http", "", "", "host", 0, "/path%2e.%2E", "", "", "http://host/path%2e.%2E"});
</del><span class="cx">
</span><ins>+ checkURL("http://host/path%2e.%2E", {"http", "", "", "host", 0, "/path%2e.%2E", "", "", "http://host/path%2e.%2E"});
+
</ins><span class="cx"> checkRelativeURLDifferences(utf16String(u"http://foo:💩@example.com/bar"), "http://other.com/",
</span><span class="cx"> {"http", "foo", utf16String(u"💩"), "example.com", 0, "/bar", "", "", "http://foo:%F0%9F%92%A9@example.com/bar"},
</span><span class="cx"> {"", "", "", "", 0, "", "", "", utf16String(u"http://foo:💩@example.com/bar")}, testTabsValueForSurrogatePairs);
</span></span></pre>
</div>
</div>
</body>
</html>