[Fetch API] Implement Fetch API Headers
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jan 2016 10:53:53 +0000 (10:53 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jan 2016 10:53:53 +0000 (10:53 +0000)
commitfdc9e5a17b74a0c78e4bf3f88fbab0e20efdeb92
tree66394afeb09463714d91e94ea90c494b98327c31
parent98edf1b35517a1397793e3ccd846fd3fcab4c25d
[Fetch API] Implement Fetch API Headers
https://bugs.webkit.org/show_bug.cgi?id=152384

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/headers/headers-basic-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-basic.html: Added.
* web-platform-tests/fetch/api/headers/headers-casing-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-casing.html: Added.
* web-platform-tests/fetch/api/headers/headers-errors-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-errors.html: Added.
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-idl.html: Added.
* web-platform-tests/fetch/api/headers/headers-nameshake-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-nameshake.html: Added.
* web-platform-tests/fetch/api/headers/headers-normalize-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-normalize.html: Added.
* web-platform-tests/fetch/api/headers/headers-structure-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-structure.html: Added.

Source/WebCore:

Adding Fetch Headers API as a wapper around HTTPHeaderMap.

Tests: imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html
       imported/w3c/web-platform-tests/fetch/api/headers/headers-casing.html
       imported/w3c/web-platform-tests/fetch/api/headers/headers-errors.html
       imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html
       imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake.html
       imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize.html
       imported/w3c/web-platform-tests/fetch/api/headers/headers-structure.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/fetch/FetchHeaders.cpp: Added.
(WebCore::FetchHeaders::initializeWith):
(WebCore::isForbiddenHeaderName):
(WebCore::isForbiddenResponseHeaderName):
(WebCore::isSimpleHeader):
(WebCore::canWriteHeader):
(WebCore::FetchHeaders::append):
(WebCore::FetchHeaders::remove):
(WebCore::FetchHeaders::get):
(WebCore::FetchHeaders::has):
(WebCore::FetchHeaders::set):
* Modules/fetch/FetchHeaders.h: Added.
(WebCore::FetchHeaders::create):
(WebCore::FetchHeaders::~FetchHeaders):
(WebCore::FetchHeaders::internalHeaders):
(WebCore::FetchHeaders::FetchHeaders):
* Modules/fetch/FetchHeaders.idl: Added.
* Modules/fetch/FetchHeaders.js: Added.
(initializeFetchHeaders):
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
(WebCore::JSBuiltinFunctions::fetchHeadersBuiltins):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::contains):
(WebCore::HTTPHeaderMap::remove):
* platform/network/HTTPHeaderMap.h:

LayoutTests:

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-basic-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-casing-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-casing.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-errors-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-errors.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-structure-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-structure.html [new file with mode: 0644]
LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/fetch/FetchHeaders.cpp [new file with mode: 0644]
Source/WebCore/Modules/fetch/FetchHeaders.h [new file with mode: 0644]
Source/WebCore/Modules/fetch/FetchHeaders.idl [new file with mode: 0644]
Source/WebCore/Modules/fetch/FetchHeaders.js [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp
Source/WebCore/bindings/js/WebCoreJSBuiltins.h
Source/WebCore/platform/network/HTTPHeaderMap.cpp
Source/WebCore/platform/network/HTTPHeaderMap.h