[WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobal...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Jul 2017 20:27:19 +0000 (20:27 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Jul 2017 20:27:19 +0000 (20:27 +0000)
commit537e8b084c2d21e1b6e0ee15a44f4abf72654783
tree8c04a7e8da31ad7a3b09939b5d7dafaad1b38c89
parentd15d53ddbb2432fce4a9bfaffdb59b0f4b4b525a
[WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobalScopeFetch
https://bugs.webkit.org/show_bug.cgi?id=174974

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/basic/mode-same-origin.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-others-expected.txt:
* web-platform-tests/fetch/api/cors/cors-cookies.any-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-expected.txt:
* web-platform-tests/fetch/api/request/request-bad-port-expected.txt:
Update results to have the correct line number for exceptions reported in the console.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Modules/fetch/DOMWindowFetch.js: Removed.
* Modules/fetch/FetchRequest.js: Removed.
* Modules/fetch/WorkerGlobalScopeFetch.js: Removed.
Remove builtin files.

* Modules/fetch/DOMWindowFetch.cpp:
(WebCore::DOMWindowFetch::fetch):
* Modules/fetch/DOMWindowFetch.h:
* Modules/fetch/DOMWindowFetch.idl:
* Modules/fetch/WorkerGlobalScopeFetch.cpp:
(WebCore::WorkerGlobalScopeFetch::fetch):
* Modules/fetch/WorkerGlobalScopeFetch.h:
* Modules/fetch/WorkerGlobalScopeFetch.idl:
Remove builtin and instead create FetchRequest in the implementation.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::extractBody):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchResponse.cpp:
* Modules/fetch/FetchResponse.h:
Rename FetchBody::BindingDataType to FetchBody::Init to match its IDL naming.

* Modules/fetch/FetchHeaders.cpp:
(WebCore::appendToHeaderMap):
(WebCore::fillHeaderMap):
(WebCore::FetchHeaders::create):
(WebCore::FetchHeaders::fill):
* Modules/fetch/FetchHeaders.h:
Add helpers to implement the fill algorithm for various input types.
Leave the existing fill for now, as it is still used by the FetchResponse
builtin, but will eventually be removed.

* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::initializeOptions):
(WebCore::FetchRequest::initializeWith):
(WebCore::FetchRequest::setBody):
(WebCore::FetchRequest::create):
(WebCore::FetchRequest::setBodyFromInputRequest): Deleted.
* Modules/fetch/FetchRequest.h:
Migrate builtin code to the implementation. This is 1-to-1 re-implementation,
so I did not attempt to fix any conformance issues. That will come in follow up.

* Modules/fetch/FetchRequest.idl:
Replace builtins with an IDL constructor.

* Modules/fetch/FetchRequestInit.h:
* Modules/fetch/FetchRequestInit.idl:
Add missing headers and body to FetchRequestInit.

LayoutTests:

* http/tests/inspector/network/fetch-network-data-expected.txt:
Update results to have the correct line number for exceptions reported in the console.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/fetch-network-data-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-bad-port-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/fetch/DOMWindowFetch.cpp
Source/WebCore/Modules/fetch/DOMWindowFetch.h
Source/WebCore/Modules/fetch/DOMWindowFetch.idl
Source/WebCore/Modules/fetch/DOMWindowFetch.js [deleted file]
Source/WebCore/Modules/fetch/FetchBody.cpp
Source/WebCore/Modules/fetch/FetchBody.h
Source/WebCore/Modules/fetch/FetchBodyOwner.cpp
Source/WebCore/Modules/fetch/FetchBodyOwner.h
Source/WebCore/Modules/fetch/FetchHeaders.cpp
Source/WebCore/Modules/fetch/FetchHeaders.h
Source/WebCore/Modules/fetch/FetchRequest.cpp
Source/WebCore/Modules/fetch/FetchRequest.h
Source/WebCore/Modules/fetch/FetchRequest.idl
Source/WebCore/Modules/fetch/FetchRequest.js [deleted file]
Source/WebCore/Modules/fetch/FetchRequestInit.h
Source/WebCore/Modules/fetch/FetchRequestInit.idl
Source/WebCore/Modules/fetch/FetchResponse.cpp
Source/WebCore/Modules/fetch/FetchResponse.h
Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.cpp
Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.h
Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.idl
Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.js [deleted file]
Source/WebCore/WebCore.xcodeproj/project.pbxproj