Title: [213140] releases/WebKitGTK/webkit-2.16
Revision
213140
Author
carlo...@webkit.org
Date
2017-02-28 01:42:18 -0800 (Tue, 28 Feb 2017)

Log Message

Merge r212977 - Non-special relative URLs should not ignore extra slashes
https://bugs.webkit.org/show_bug.cgi?id=168834

Reviewed by Sam Weinig.

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:

Special authority ignore slashes state should, as its name implies,
only be reached by special URLs.  See https://url.spec.whatwg.org/#relative-slash-state

Covered by newly passing web platform tests.

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

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog (213139 => 213140)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog	2017-02-28 09:39:54 UTC (rev 213139)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog	2017-02-28 09:42:18 UTC (rev 213140)
@@ -1,5 +1,16 @@
 2017-02-24  Alex Christensen  <achristen...@webkit.org>
 
+        Non-special relative URLs should not ignore extra slashes
+        https://bugs.webkit.org/show_bug.cgi?id=168834
+
+        Reviewed by Sam Weinig.
+
+        * 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:
+
+2017-02-24  Alex Christensen  <achristen...@webkit.org>
+
         .. should not remove windows drive letters in paths of file URLs
         https://bugs.webkit.org/show_bug.cgi?id=168824
 

Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (213139 => 213140)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt	2017-02-28 09:39:54 UTC (rev 213139)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt	2017-02-28 09:42:18 UTC (rev 213140)
@@ -403,9 +403,9 @@
 PASS Parsing: <?x> against <sc://ñ> 
 PASS Parsing: <sc://?> against <about:blank> 
 PASS Parsing: <sc://#> against <about:blank> 
-FAIL Parsing: <///> against <sc://x/> assert_equals: href expected "sc:///" but got "///"
-FAIL Parsing: <////> against <sc://x/> assert_equals: href expected "sc:////" but got "////"
-FAIL Parsing: <////x/> against <sc://x/> assert_equals: href expected "sc:////x/" but got "sc://x/"
+PASS Parsing: <///> against <sc://x/> 
+PASS Parsing: <////> against <sc://x/> 
+PASS Parsing: <////x/> against <sc://x/> 
 PASS Parsing: <tftp://foobar.com/someconfig;mode=netascii> against <about:blank> 
 PASS Parsing: <telnet://user:p...@foobar.com:23/> against <about:blank> 
 PASS Parsing: <ut2004://10.10.10.10:7777/Index.ut2> against <about:blank> 

Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (213139 => 213140)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt	2017-02-28 09:39:54 UTC (rev 213139)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt	2017-02-28 09:42:18 UTC (rev 213140)
@@ -403,9 +403,9 @@
 PASS Parsing: <?x> against <sc://ñ> 
 PASS Parsing: <sc://?> against <about:blank> 
 PASS Parsing: <sc://#> against <about:blank> 
-FAIL Parsing: <///> against <sc://x/> assert_equals: href expected "sc:///" but got "///"
-FAIL Parsing: <////> against <sc://x/> assert_equals: href expected "sc:////" but got "////"
-FAIL Parsing: <////x/> against <sc://x/> assert_equals: href expected "sc:////x/" but got "sc://x/"
+PASS Parsing: <///> against <sc://x/> 
+PASS Parsing: <////> against <sc://x/> 
+PASS Parsing: <////x/> against <sc://x/> 
 PASS Parsing: <tftp://foobar.com/someconfig;mode=netascii> against <about:blank> 
 PASS Parsing: <telnet://user:p...@foobar.com:23/> against <about:blank> 
 PASS Parsing: <ut2004://10.10.10.10:7777/Index.ut2> against <about:blank> 

Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (213139 => 213140)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt	2017-02-28 09:39:54 UTC (rev 213139)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt	2017-02-28 09:42:18 UTC (rev 213140)
@@ -411,9 +411,9 @@
 PASS Parsing: <?x> against <sc://ñ> 
 PASS Parsing: <sc://?> against <about:blank> 
 PASS Parsing: <sc://#> against <about:blank> 
-FAIL Parsing: <///> against <sc://x/> Type error
-FAIL Parsing: <////> against <sc://x/> Type error
-FAIL Parsing: <////x/> against <sc://x/> assert_equals: href expected "sc:////x/" but got "sc://x/"
+PASS Parsing: <///> against <sc://x/> 
+PASS Parsing: <////> against <sc://x/> 
+PASS Parsing: <////x/> against <sc://x/> 
 PASS Parsing: <tftp://foobar.com/someconfig;mode=netascii> against <about:blank> 
 PASS Parsing: <telnet://user:p...@foobar.com:23/> against <about:blank> 
 PASS Parsing: <ut2004://10.10.10.10:7777/Index.ut2> against <about:blank> 

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (213139 => 213140)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-02-28 09:39:54 UTC (rev 213139)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-02-28 09:42:18 UTC (rev 213140)
@@ -1,3 +1,18 @@
+2017-02-24  Alex Christensen  <achristen...@webkit.org>
+
+        Non-special relative URLs should not ignore extra slashes
+        https://bugs.webkit.org/show_bug.cgi?id=168834
+
+        Reviewed by Sam Weinig.
+
+        Special authority ignore slashes state should, as its name implies,
+        only be reached by special URLs.  See https://url.spec.whatwg.org/#relative-slash-state
+
+        Covered by newly passing web platform tests.
+
+        * platform/URLParser.cpp:
+        (WebCore::URLParser::parse):
+
 2017-02-24  Alexey Proskuryakov  <a...@apple.com>
 
         Build fix for newer clang

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp (213139 => 213140)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp	2017-02-28 09:39:54 UTC (rev 213139)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp	2017-02-28 09:42:18 UTC (rev 213140)
@@ -36,7 +36,6 @@
 namespace WebCore {
 
 #define URL_PARSER_DEBUGGING 0
-#define COMPARE_URLPARSERS 0
 
 #if URL_PARSER_DEBUGGING
 #define URL_PARSER_LOG(...) LOG(URLParser, __VA_ARGS__)
@@ -1389,7 +1388,13 @@
                 ++c;
                 copyURLPartsUntil(base, URLPart::SchemeEnd, c, isUTF8Encoding);
                 appendToASCIIBuffer("://", 3);
-                state = State::SpecialAuthorityIgnoreSlashes;
+                if (m_urlIsSpecial)
+                    state = State::SpecialAuthorityIgnoreSlashes;
+                else {
+                    m_url.m_userStart = currentPosition(c);
+                    state = State::AuthorityOrHost;
+                    authorityOrHostBegin = c;
+                }
             } else {
                 copyURLPartsUntil(base, URLPart::PortEnd, c, isUTF8Encoding);
                 appendToASCIIBuffer('/');
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to