[Cache API] Add Cache and CacheStorage IDL definitions
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Aug 2017 05:06:13 +0000 (05:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Aug 2017 05:06:13 +0000 (05:06 +0000)
commit374a4f8a565e7d10a7795b2c05eac504aa525700
tree42fb6ec337ace4d897a61802ff485fc834e62a1c
parent54de1aff2fe8b290259fb07f5840c3b166614b5b
[Cache API] Add Cache and CacheStorage IDL definitions
https://bugs.webkit.org/show_bug.cgi?id=175201

Patch by Youenn Fablet <youenn@apple.com> on 2017-08-04
Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/cache-storage/common.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/serviceworker/credentials.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-add.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-delete.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-keys.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-storage-keys.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-storage-match.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/cache-storage.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/window/sandboxed-iframes.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-add.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-delete.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-keys.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-put.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-storage-keys.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-storage-match.https-expected.txt: Added.
* web-platform-tests/service-workers/cache-storage/worker/cache-storage.https-expected.txt: Added.
* web-platform-tests/service-workers/stub-4.6.2-cache-expected.txt: Added.
* web-platform-tests/service-workers/stub-4.6.3-cache-storage-expected.txt: Added.

Source/JavaScriptCore:

* runtime/CommonIdentifiers.h:

Source/WebCore:

Covered by activated tests.
Adding IDLs as per https://www.w3.org/TR/service-workers-1/#idl-index.
Implementation is guarded by a runtime flag which is off by default.
It is off for DRT but on for WTR.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/cache/Cache.cpp: Added.
(WebCore::Cache::match):
(WebCore::Cache::matchAll):
(WebCore::Cache::add):
(WebCore::Cache::addAll):
(WebCore::Cache::put):
(WebCore::Cache::remove):
(WebCore::Cache::keys):
* Modules/cache/Cache.h: Added.
(WebCore::Cache::create):
(WebCore::Cache::Cache):
* Modules/cache/Cache.idl: Added.
* Modules/cache/CacheQueryOptions.h: Added.
* Modules/cache/CacheQueryOptions.idl: Added.
* Modules/cache/CacheStorage.cpp: Added.
(WebCore::CacheStorage::match):
(WebCore::CacheStorage::has):
(WebCore::CacheStorage::open):
(WebCore::CacheStorage::remove):
(WebCore::CacheStorage::keys):
* Modules/cache/CacheStorage.h: Added.
(WebCore::CacheStorage::create):
* Modules/cache/CacheStorage.idl: Added.
* Modules/cache/DOMWindowCaches.cpp: Added.
(WebCore::DOMWindowCaches::DOMWindowCaches):
(WebCore::DOMWindowCaches::supplementName):
(WebCore::DOMWindowCaches::from):
(WebCore::DOMWindowCaches::caches):
(WebCore::DOMWindowCaches::caches const):
* Modules/cache/DOMWindowCaches.h: Added.
* Modules/cache/DOMWindowCaches.idl: Added.
* Modules/cache/WorkerGlobalScopeCaches.cpp: Added.
(WebCore::WorkerGlobalScopeCaches::supplementName):
(WebCore::WorkerGlobalScopeCaches::from):
(WebCore::WorkerGlobalScopeCaches::caches):
(WebCore::WorkerGlobalScopeCaches::caches const):
* Modules/cache/WorkerGlobalScopeCaches.h: Added.
* Modules/cache/WorkerGlobalScopeCaches.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCacheAPIEnabled):
(WebCore::RuntimeEnabledFeatures::cacheAPIEnabled const):

Source/WebKit:

* Shared/WebPreferencesDefinitions.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences cacheAPIEnabled]):
(-[WebPreferences setCacheAPIEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setCacheAPIEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

* TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/mac-highsierra/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
76 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub.html
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/common.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/credentials.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-add.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-delete.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-keys.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-storage-keys.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-storage-match.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-storage.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/sandboxed-iframes.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-add.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-delete.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-keys.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-put.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-storage-keys.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-storage-match.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-storage.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/stub-4.6.2-cache-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/stub-4.6.3-cache-storage-expected.txt [new file with mode: 0644]
LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/mac-highsierra/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-dedicated-worker-expected.txt [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/cache/Cache.cpp [new file with mode: 0644]
Source/WebCore/Modules/cache/Cache.h [new file with mode: 0644]
Source/WebCore/Modules/cache/Cache.idl [new file with mode: 0644]
Source/WebCore/Modules/cache/CacheQueryOptions.h [new file with mode: 0644]
Source/WebCore/Modules/cache/CacheQueryOptions.idl [new file with mode: 0644]
Source/WebCore/Modules/cache/CacheStorage.cpp [new file with mode: 0644]
Source/WebCore/Modules/cache/CacheStorage.h [new file with mode: 0644]
Source/WebCore/Modules/cache/CacheStorage.idl [new file with mode: 0644]
Source/WebCore/Modules/cache/DOMWindowCaches.cpp [new file with mode: 0644]
Source/WebCore/Modules/cache/DOMWindowCaches.h [new file with mode: 0644]
Source/WebCore/Modules/cache/DOMWindowCaches.idl [new file with mode: 0644]
Source/WebCore/Modules/cache/WorkerGlobalScopeCaches.cpp [new file with mode: 0644]
Source/WebCore/Modules/cache/WorkerGlobalScopeCaches.h [new file with mode: 0644]
Source/WebCore/Modules/cache/WorkerGlobalScopeCaches.idl [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferencesDefinitions.h
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h