URLParser should match old URL::parse with %2E in path
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Oct 2016 04:40:23 +0000 (04:40 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Oct 2016 04:40:23 +0000 (04:40 +0000)
commit3d2a853f3bd8d19fd12088324b28d426e35d8d93
tree8d8c6489fcc4f67880576e3cafbbddc6e942b390
parent7f07e6e66564b4b8f30923da3ac5ea480fe2a18c
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/url/path-expected.txt
LayoutTests/fast/url/standard-url-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/URLParser.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp