Implement URLSearchParams
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Sep 2016 01:34:27 +0000 (01:34 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Sep 2016 01:34:27 +0000 (01:34 +0000)
commitdfa43214be96293db59c016fe8fedccc9209d793
tree84dbb9ea46c1b83b9fffdbddf1cd3d7170ffc007
parentfc6283ede504c61dbcfbaffee798842bccb97d90
Implement URLSearchParams
https://bugs.webkit.org/show_bug.cgi?id=161920

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/XMLHttpRequest/send-usp-expected.txt:
* web-platform-tests/fetch/api/request/request-init-002-expected.txt:
* web-platform-tests/fetch/api/response/response-init-002-expected.txt:
* web-platform-tests/url/interfaces-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/urlsearchparams-append-expected.txt:
* web-platform-tests/url/urlsearchparams-constructor-expected.txt:
* web-platform-tests/url/urlsearchparams-delete-expected.txt:
* web-platform-tests/url/urlsearchparams-get-expected.txt:
* web-platform-tests/url/urlsearchparams-getall-expected.txt:
* web-platform-tests/url/urlsearchparams-has-expected.txt:
* web-platform-tests/url/urlsearchparams-set-expected.txt:
* web-platform-tests/url/urlsearchparams-stringifier-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* html/DOMURL.cpp:
(WebCore::DOMURL::setQuery):
(WebCore::DOMURL::searchParams):
* html/DOMURL.h:
* html/URLSearchParams.cpp: Added.
(WebCore::URLSearchParams::URLSearchParams):
(WebCore::URLSearchParams::get):
(WebCore::URLSearchParams::has):
(WebCore::URLSearchParams::set):
(WebCore::URLSearchParams::append):
(WebCore::URLSearchParams::getAll):
(WebCore::URLSearchParams::remove):
(WebCore::URLSearchParams::toString):
(WebCore::URLSearchParams::updateURL):
(WebCore::URLSearchParams::Iterator::Iterator):
* html/URLSearchParams.h: Added.
(WebCore::URLSearchParams::create):
(WebCore::URLSearchParams::createIterator):
* html/URLSearchParams.idl: Added.
* html/URLUtils.idl:
* platform/URLParser.cpp:
(WebCore::percentDecode):
(WebCore::URLParser::parseHost):
(WebCore::formURLDecode):
(WebCore::serializeURLEncodedForm):
(WebCore::URLParser::serialize):
* platform/URLParser.h:

Source/WTF:

* wtf/text/StringView.h:
(WTF::StringView::split): Added.

LayoutTests:

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
37 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/DOMURL/searchparams-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/DOMURL/searchparams.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-002-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-init-002-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set-expected.txt
LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier-expected.txt
LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
Source/WTF/ChangeLog
Source/WTF/wtf/text/StringView.cpp
Source/WTF/wtf/text/StringView.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/DOMURL.cpp
Source/WebCore/html/DOMURL.h
Source/WebCore/html/URLSearchParams.cpp [new file with mode: 0644]
Source/WebCore/html/URLSearchParams.h [new file with mode: 0644]
Source/WebCore/html/URLSearchParams.idl [new file with mode: 0644]
Source/WebCore/html/URLUtils.h
Source/WebCore/html/URLUtils.idl
Source/WebCore/platform/URLParser.cpp
Source/WebCore/platform/URLParser.h