Changeset 220758 in webkit
- Timestamp:
- Aug 15, 2017 2:04:38 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 58 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r220751 r220758 1 2017-08-15 Youenn Fablet <youenn@apple.com> 2 3 [Cache API] Adding generic support for CacheStorage and Cache methods 4 https://bugs.webkit.org/show_bug.cgi?id=175455 5 6 Reviewed by Chris Dumez. 7 8 * TestExpectations: Skipping a test that would timeout otherwise due to the current implementation limitations. 9 1 10 2017-08-15 Chris Dumez <cdumez@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r220750 r220758 122 122 imported/w3c/web-platform-tests/service-workers/cache-storage [ Pass ] 123 123 imported/w3c/web-platform-tests/service-workers/cache-storage/window [ Pass Failure ] 124 124 imported/w3c/web-platform-tests/service-workers/cache-storage/common.https.html [ Skip ] 125 125 126 126 # textarea.animate is not supported -
trunk/LayoutTests/imported/w3c/ChangeLog
r220754 r220758 1 2017-08-15 Youenn Fablet <youenn@apple.com> 2 3 [Cache API] Adding generic support for CacheStorage and Cache methods 4 https://bugs.webkit.org/show_bug.cgi?id=175455 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/service-workers/cache-storage/serviceworker/credentials.https-expected.txt: 9 * web-platform-tests/service-workers/cache-storage/window/cache-storage-match.https-expected.txt: 10 * web-platform-tests/service-workers/cache-storage/window/cache-storage.https-expected.txt: 11 * web-platform-tests/service-workers/cache-storage/worker/cache-storage-match.https-expected.txt: 12 * web-platform-tests/service-workers/cache-storage/worker/cache-storage.https-expected.txt: 13 1 14 2017-08-15 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/credentials.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache API matching includes credentials promise_test: Unhandled rejection with value: object "TypeError: Not implemented"2 FAIL Cache API matching includes credentials assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-add.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.add called with no arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.add called with relative URL specified as a string promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.add called with non-HTTP/HTTPS URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.add called with Request object promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.add called with POST request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.add called twice with the same Request object promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.add with request with null body (not consumed) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.add with 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.addAll with 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.add with request that results in a status of 404 promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.add with request that results in a status of 500 promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.addAll with no arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.addAll with a mix of valid and undefined arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.addAll with an empty array promise_test: Unhandled rejection with value: object " TypeError: Not implemented"16 FAIL Cache.addAll with string URL arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"17 FAIL Cache.addAll with Request arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"18 FAIL Cache.addAll with a mix of succeeding and failing requests promise_test: Unhandled rejection with value: object " TypeError: Not implemented"19 FAIL Cache.addAll called with the same Request object specified twice promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.add called with no arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.add called with relative URL specified as a string promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.add called with non-HTTP/HTTPS URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.add called with Request object promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.add called with POST request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.add called twice with the same Request object promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.add with request with null body (not consumed) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.add with 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.addAll with 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.add with request that results in a status of 404 promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.add with request that results in a status of 500 promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.addAll with no arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.addAll with a mix of valid and undefined arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.addAll with an empty array promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 FAIL Cache.addAll with string URL arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 17 FAIL Cache.addAll with Request arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 18 FAIL Cache.addAll with a mix of succeeding and failing requests promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 19 FAIL Cache.addAll called with the same Request object specified twice promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 20 20 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-delete.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.delete with no arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.delete called with a string URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.delete called with a Request object promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.delete called with a HEAD request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.delete supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.delete with a non-existent entry promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.delete with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.delete with ignoreSearch option (when it is specified as false) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.delete with no arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.delete called with a string URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.delete called with a Request object promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.delete called with a HEAD request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.delete supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.delete with a non-existent entry promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.delete with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.delete with ignoreSearch option (when it is specified as false) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-keys.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.keys() called on an empty cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.keys with no matching entries promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.keys with URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.keys with Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.keys with new Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.keys with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.keys with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.keys supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.keys supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.keys with URL containing fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.keys with string fragment "http" as query promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.keys without parameters promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.keys with a HEAD Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.keys() called on an empty cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.keys with no matching entries promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.keys with URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.keys with Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.keys with new Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.keys with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.keys with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.keys supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.keys supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.keys with URL containing fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.keys with string fragment "http" as query promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.keys without parameters promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.keys with a HEAD Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.match with no matching entries promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.match with URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.match with Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.match with multiple cache hits promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.match with new Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.match with HEAD promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.match with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.match with ignoreSearch option (request with search parameter) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.match supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.match with URL containing fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.match with string fragment "http" as query promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.match with responses containing "Vary" header promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.match with Request and Response objects with different URLs promise_test: Unhandled rejection with value: object " TypeError: Not implemented"16 FAIL Cache.match invoked multiple times for the same Request/Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"17 FAIL Cache.match blob should be sliceable promise_test: Unhandled rejection with value: object " TypeError: Not implemented"18 FAIL Cache.match with POST Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"19 FAIL Cache.match with a non-2xx Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"20 FAIL Cache.match with a network error Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"21 FAIL Cache produces large Responses that can be cloned and read correctly. promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.match with no matching entries promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.match with URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.match with Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.match with multiple cache hits promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.match with new Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.match with HEAD promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.match with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.match with ignoreSearch option (request with search parameter) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.match supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.match with URL containing fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.match with string fragment "http" as query promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.match with responses containing "Vary" header promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.match with Request and Response objects with different URLs promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 FAIL Cache.match invoked multiple times for the same Request/Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 17 FAIL Cache.match blob should be sliceable promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 18 FAIL Cache.match with POST Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 19 FAIL Cache.match with a non-2xx Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 20 FAIL Cache.match with a network error Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 21 FAIL Cache produces large Responses that can be cloned and read correctly. promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 22 22 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.matchAll with no matching entries promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.matchAll with URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.matchAll with Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.matchAll with new Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.matchAll with HEAD promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.matchAll with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.matchAll with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.matchAll supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.matchAll supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.matchAll with URL containing fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.matchAll with string fragment "http" as query promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.matchAll without parameters promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.matchAll with responses containing "Vary" header promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.matchAll with multiple vary pairs promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.matchAll with no matching entries promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.matchAll with URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.matchAll with Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.matchAll with new Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.matchAll with HEAD promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.matchAll with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.matchAll with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.matchAll supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.matchAll supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.matchAll with URL containing fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.matchAll with string fragment "http" as query promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.matchAll without parameters promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.matchAll with responses containing "Vary" header promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.matchAll with multiple vary pairs promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-put.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.put called with simple Request and Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.put called with Request and Response from fetch() promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.put with Request without a body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.put with Response without a body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.put with a Response containing an empty URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.put with an empty response body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.put with synthetic 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.put with HTTP 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.put with HTTP 500 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.put called twice with matching Requests and different Responses promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.put called twice with request URLs that differ only by a fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.put with a string request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.put with an invalid response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.put with a non-HTTP/HTTPS request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"16 FAIL Cache.put with a relative URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"17 FAIL Cache.put with a non-GET request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"18 FAIL Cache.put with a null response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"19 FAIL Cache.put with a POST request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"20 FAIL Cache.put with a used response body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"21 FAIL getReader() after Cache.put promise_test: Unhandled rejection with value: object " TypeError: Not implemented"22 FAIL Cache.put with a VARY:* Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"23 FAIL Cache.put with an embedded VARY:* Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"24 FAIL Cache.put should store Response.redirect() correctly promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.put called with simple Request and Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.put called with Request and Response from fetch() promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.put with Request without a body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.put with Response without a body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.put with a Response containing an empty URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.put with an empty response body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.put with synthetic 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.put with HTTP 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.put with HTTP 500 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.put called twice with matching Requests and different Responses promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.put called twice with request URLs that differ only by a fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.put with a string request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.put with an invalid response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.put with a non-HTTP/HTTPS request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 FAIL Cache.put with a relative URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 17 FAIL Cache.put with a non-GET request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 18 FAIL Cache.put with a null response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 19 FAIL Cache.put with a POST request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 20 FAIL Cache.put with a used response body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 21 FAIL getReader() after Cache.put promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 22 FAIL Cache.put with a VARY:* Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 23 FAIL Cache.put with an embedded VARY:* Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 24 FAIL Cache.put should store Response.redirect() correctly promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 25 25 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-storage-keys.https-expected.txt
r220311 r220758 1 1 2 FAIL CacheStorage keys promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL CacheStorage keys promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-storage-match.https-expected.txt
r220311 r220758 1 1 2 FAIL CacheStorageMatch with no cache name provided promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL CacheStorageMatch from one of many caches promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL CacheStorageMatch from one of many caches by name promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL CacheStorageMatch a string request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL CacheStorageMatch a HEAD request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL CacheStorageMatch with no cached entry promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL CacheStorageMatch with no caches available but name provided promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL CacheStorageMatch with empty cache name provided promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL CacheStorageMatch supports ignoreSearch promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL CacheStorageMatch supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL CacheStorageMatch with no cache name provided promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL CacheStorageMatch from one of many caches promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL CacheStorageMatch from one of many caches by name promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL CacheStorageMatch a string request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL CacheStorageMatch a HEAD request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL CacheStorageMatch with no cached entry promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL CacheStorageMatch with no caches available but name provided promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL CacheStorageMatch with empty cache name provided promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL CacheStorageMatch supports ignoreSearch promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL CacheStorageMatch supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-storage.https-expected.txt
r220311 r220758 1 1 2 FAIL CacheStorage.open promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL CacheStorage.delete dooms, but does not delete immediately promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL CacheStorage.open with an empty name promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL CacheStorage.open promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL CacheStorage.delete dooms, but does not delete immediately promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL CacheStorage.open with an empty name promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 5 PASS CacheStorage.open with no arguments 6 FAIL CacheStorage.has with existing cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL CacheStorage.has with nonexistent cache promise_test: Unhandled rejection with value: object "TypeError: Not implemented" 8 FAIL CacheStorage.open with existing cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL CacheStorage.delete with existing cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL CacheStorage.delete with nonexistent cache promise_test: Unhandled rejection with value: object "TypeError: Not implemented" 11 FAIL CacheStorage names are DOMStrings not USVStrings promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL CacheStorage.has with existing cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 PASS CacheStorage.has with nonexistent cache 8 FAIL CacheStorage.open with existing cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL CacheStorage.delete with existing cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 PASS CacheStorage.delete with nonexistent cache 11 FAIL CacheStorage names are DOMStrings not USVStrings promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/sandboxed-iframes.https-expected.txt
r220311 r220758 2 2 3 3 FAIL Sandboxed iframe with allow-same-origin is allowed access assert_equals: Access should be allowed if sandbox has allow-same-origin expected "allowed" but got "denied" 4 FAIL Sandboxed iframe without allow-same-origin is denied access assert_equals: Failure should be a SecurityError expected "SecurityError" but got " TypeError"4 FAIL Sandboxed iframe without allow-same-origin is denied access assert_equals: Failure should be a SecurityError expected "SecurityError" but got "NotSupportedError" 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-add.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.add called with no arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.add called with relative URL specified as a string promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.add called with non-HTTP/HTTPS URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.add called with Request object promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.add called with POST request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.add called twice with the same Request object promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.add with request with null body (not consumed) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.add with 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.addAll with 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.add with request that results in a status of 404 promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.add with request that results in a status of 500 promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.addAll with no arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.addAll with a mix of valid and undefined arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.addAll with an empty array promise_test: Unhandled rejection with value: object " TypeError: Not implemented"16 FAIL Cache.addAll with string URL arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"17 FAIL Cache.addAll with Request arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"18 FAIL Cache.addAll with a mix of succeeding and failing requests promise_test: Unhandled rejection with value: object " TypeError: Not implemented"19 FAIL Cache.addAll called with the same Request object specified twice promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.add called with no arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.add called with relative URL specified as a string promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.add called with non-HTTP/HTTPS URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.add called with Request object promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.add called with POST request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.add called twice with the same Request object promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.add with request with null body (not consumed) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.add with 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.addAll with 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.add with request that results in a status of 404 promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.add with request that results in a status of 500 promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.addAll with no arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.addAll with a mix of valid and undefined arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.addAll with an empty array promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 FAIL Cache.addAll with string URL arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 17 FAIL Cache.addAll with Request arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 18 FAIL Cache.addAll with a mix of succeeding and failing requests promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 19 FAIL Cache.addAll called with the same Request object specified twice promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 20 20 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-delete.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.delete with no arguments promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.delete called with a string URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.delete called with a Request object promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.delete called with a HEAD request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.delete supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.delete with a non-existent entry promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.delete with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.delete with ignoreSearch option (when it is specified as false) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.delete with no arguments promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.delete called with a string URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.delete called with a Request object promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.delete called with a HEAD request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.delete supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.delete with a non-existent entry promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.delete with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.delete with ignoreSearch option (when it is specified as false) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-keys.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.keys() called on an empty cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.keys with no matching entries promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.keys with URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.keys with Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.keys with new Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.keys with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.keys with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.keys supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.keys supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.keys with URL containing fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.keys with string fragment "http" as query promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.keys without parameters promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.keys with a HEAD Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.keys() called on an empty cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.keys with no matching entries promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.keys with URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.keys with Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.keys with new Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.keys with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.keys with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.keys supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.keys supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.keys with URL containing fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.keys with string fragment "http" as query promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.keys without parameters promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.keys with a HEAD Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.match with no matching entries promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.match with URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.match with Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.match with multiple cache hits promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.match with new Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.match with HEAD promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.match with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.match with ignoreSearch option (request with search parameter) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.match supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.match with URL containing fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.match with string fragment "http" as query promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.match with responses containing "Vary" header promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.match with Request and Response objects with different URLs promise_test: Unhandled rejection with value: object " TypeError: Not implemented"16 FAIL Cache.match invoked multiple times for the same Request/Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"17 FAIL Cache.match blob should be sliceable promise_test: Unhandled rejection with value: object " TypeError: Not implemented"18 FAIL Cache.match with POST Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"19 FAIL Cache.match with a non-2xx Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"20 FAIL Cache.match with a network error Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"21 FAIL Cache produces large Responses that can be cloned and read correctly. promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.match with no matching entries promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.match with URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.match with Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.match with multiple cache hits promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.match with new Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.match with HEAD promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.match with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.match with ignoreSearch option (request with search parameter) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.match supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.match with URL containing fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.match with string fragment "http" as query promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.match with responses containing "Vary" header promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.match with Request and Response objects with different URLs promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 FAIL Cache.match invoked multiple times for the same Request/Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 17 FAIL Cache.match blob should be sliceable promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 18 FAIL Cache.match with POST Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 19 FAIL Cache.match with a non-2xx Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 20 FAIL Cache.match with a network error Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 21 FAIL Cache produces large Responses that can be cloned and read correctly. promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 22 22 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.matchAll with no matching entries promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.matchAll with URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.matchAll with Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.matchAll with new Request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.matchAll with HEAD promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.matchAll with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.matchAll with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.matchAll supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.matchAll supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.matchAll with URL containing fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.matchAll with string fragment "http" as query promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.matchAll without parameters promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.matchAll with responses containing "Vary" header promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.matchAll with multiple vary pairs promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.matchAll with no matching entries promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.matchAll with URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.matchAll with Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.matchAll with new Request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.matchAll with HEAD promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.matchAll with ignoreSearch option (request with no search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.matchAll with ignoreSearch option (request with search parameters) promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.matchAll supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.matchAll supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.matchAll with URL containing fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.matchAll with string fragment "http" as query promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.matchAll without parameters promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.matchAll with responses containing "Vary" header promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.matchAll with multiple vary pairs promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-put.https-expected.txt
r220311 r220758 1 1 2 FAIL Cache.put called with simple Request and Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL Cache.put called with Request and Response from fetch() promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL Cache.put with Request without a body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL Cache.put with Response without a body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL Cache.put with a Response containing an empty URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL Cache.put with an empty response body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL Cache.put with synthetic 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL Cache.put with HTTP 206 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL Cache.put with HTTP 500 response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.put called twice with matching Requests and different Responses promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL Cache.put called twice with request URLs that differ only by a fragment promise_test: Unhandled rejection with value: object " TypeError: Not implemented"13 FAIL Cache.put with a string request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"14 FAIL Cache.put with an invalid response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"15 FAIL Cache.put with a non-HTTP/HTTPS request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"16 FAIL Cache.put with a relative URL promise_test: Unhandled rejection with value: object " TypeError: Not implemented"17 FAIL Cache.put with a non-GET request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"18 FAIL Cache.put with a null response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"19 FAIL Cache.put with a POST request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"20 FAIL Cache.put with a used response body promise_test: Unhandled rejection with value: object " TypeError: Not implemented"21 FAIL getReader() after Cache.put promise_test: Unhandled rejection with value: object " TypeError: Not implemented"22 FAIL Cache.put with a VARY:* Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"23 FAIL Cache.put with an embedded VARY:* Response promise_test: Unhandled rejection with value: object " TypeError: Not implemented"24 FAIL Cache.put should store Response.redirect() correctly promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL Cache.put called with simple Request and Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL Cache.put called with Request and Response from fetch() promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL Cache.put with Request without a body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL Cache.put with Response without a body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL Cache.put with a Response containing an empty URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL Cache.put with an empty response body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL Cache.put with synthetic 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL Cache.put with HTTP 206 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL Cache.put with HTTP 500 response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.put called twice with matching Requests and different Responses promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL Cache.put called twice with request URLs that differ only by a fragment promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 FAIL Cache.put with a string request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 14 FAIL Cache.put with an invalid response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 15 FAIL Cache.put with a non-HTTP/HTTPS request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 16 FAIL Cache.put with a relative URL promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 17 FAIL Cache.put with a non-GET request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 18 FAIL Cache.put with a null response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 19 FAIL Cache.put with a POST request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 20 FAIL Cache.put with a used response body promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 21 FAIL getReader() after Cache.put promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 22 FAIL Cache.put with a VARY:* Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 23 FAIL Cache.put with an embedded VARY:* Response promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 24 FAIL Cache.put should store Response.redirect() correctly promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 25 25 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-storage-keys.https-expected.txt
r220311 r220758 1 1 2 FAIL CacheStorage keys promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL CacheStorage keys promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-storage-match.https-expected.txt
r220311 r220758 1 1 2 FAIL CacheStorageMatch with no cache name provided promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL CacheStorageMatch from one of many caches promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL CacheStorageMatch from one of many caches by name promise_test: Unhandled rejection with value: object " TypeError: Not implemented"5 FAIL CacheStorageMatch a string request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL CacheStorageMatch a HEAD request promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL CacheStorageMatch with no cached entry promise_test: Unhandled rejection with value: object " TypeError: Not implemented"8 FAIL CacheStorageMatch with no caches available but name provided promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL CacheStorageMatch with empty cache name provided promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL CacheStorageMatch supports ignoreSearch promise_test: Unhandled rejection with value: object " TypeError: Not implemented"11 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object " TypeError: Not implemented"12 FAIL CacheStorageMatch supports ignoreVary promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL CacheStorageMatch with no cache name provided promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL CacheStorageMatch from one of many caches promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL CacheStorageMatch from one of many caches by name promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 FAIL CacheStorageMatch a string request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 6 FAIL CacheStorageMatch a HEAD request promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 FAIL CacheStorageMatch with no cached entry promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 8 FAIL CacheStorageMatch with no caches available but name provided promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL CacheStorageMatch with empty cache name provided promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 FAIL CacheStorageMatch supports ignoreSearch promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 11 FAIL Cache.match supports ignoreMethod promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 FAIL CacheStorageMatch supports ignoreVary promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 13 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-storage.https-expected.txt
r220311 r220758 1 1 2 FAIL CacheStorage.open promise_test: Unhandled rejection with value: object " TypeError: Not implemented"3 FAIL CacheStorage.delete dooms, but does not delete immediately promise_test: Unhandled rejection with value: object " TypeError: Not implemented"4 FAIL CacheStorage.open with an empty name promise_test: Unhandled rejection with value: object " TypeError: Not implemented"2 FAIL CacheStorage.open promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 3 FAIL CacheStorage.delete dooms, but does not delete immediately promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 4 FAIL CacheStorage.open with an empty name promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 5 5 PASS CacheStorage.open with no arguments 6 FAIL CacheStorage.has with existing cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"7 FAIL CacheStorage.has with nonexistent cache promise_test: Unhandled rejection with value: object "TypeError: Not implemented" 8 FAIL CacheStorage.open with existing cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"9 FAIL CacheStorage.delete with existing cache promise_test: Unhandled rejection with value: object " TypeError: Not implemented"10 FAIL CacheStorage.delete with nonexistent cache promise_test: Unhandled rejection with value: object "TypeError: Not implemented" 11 FAIL CacheStorage names are DOMStrings not USVStrings promise_test: Unhandled rejection with value: object " TypeError: Not implemented"6 FAIL CacheStorage.has with existing cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 7 PASS CacheStorage.has with nonexistent cache 8 FAIL CacheStorage.open with existing cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 9 FAIL CacheStorage.delete with existing cache promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 10 PASS CacheStorage.delete with nonexistent cache 11 FAIL CacheStorage names are DOMStrings not USVStrings promise_test: Unhandled rejection with value: object "NotSupportedError: Not implemented" 12 12 -
trunk/Source/WebCore/CMakeLists.txt
r220751 r220758 897 897 Modules/cache/Cache.cpp 898 898 Modules/cache/CacheStorage.cpp 899 Modules/cache/CacheStorageConnection.cpp 899 900 Modules/cache/DOMWindowCaches.cpp 900 901 Modules/cache/WorkerGlobalScopeCaches.cpp -
trunk/Source/WebCore/ChangeLog
r220751 r220758 1 2017-08-15 Youenn Fablet <youenn@apple.com> 2 3 [Cache API] Adding generic support for CacheStorage and Cache methods 4 https://bugs.webkit.org/show_bug.cgi?id=175455 5 6 Reviewed by Chris Dumez. 7 8 Covered by existing tests. 9 10 Adding a CacheStorageProvider abstraction that creates a CacheStorageConnection. 11 The CacheStorageProvider is accessed from the page for Document calls. 12 The CacheStorageConnection is responsible to implement the read/write operations on the cache database. 13 At the moment, it does nothing but return not implemented errors. 14 15 Implementing CacheStorage APIs and Cache APIs based on the CacheStorageConnection except for Cache add and addAll which will be implemented later on. 16 CacheStoragConnection is responsible to read/write CacheStorage list of caches and each individual cache. 17 The CacheStorageConnection is a generic connection and not tied to any document/context. 18 CacheStorage objects are manipulated by providing to the connection the origin of the context. 19 CacheStorage are global to all contexts with the same origin. 20 Cache objects are manipulated by an ID that is given initially by the CacheStorageEngine when opening the Cache object. 21 22 Adding various accessors and constructors for Fetch constructs as needed by the Cache API implementation. 23 24 * Modules/cache/Cache.cpp: 25 (WebCore::Cache::Cache): 26 (WebCore::Cache::~Cache): 27 The CacheStorageConnection is a generic connection and not tied to any document/context. 28 (WebCore::Cache::match): Implementation of https://www.w3.org/TR/service-workers-1/#cache-match. 29 Redirect to matchAll as per spec. 30 (WebCore::Cache::matchAll): Implementation of https://www.w3.org/TR/service-workers-1/#cache-matchAll. 31 Checks for request as per spec. Then either refresh the request to response map and return all responses. 32 Or call the query cache algorithm and return copies of the responses (using clone). 33 (WebCore::Cache::put): 34 Check the request and response as per spec. 35 Add temporary rejection cases (being loaded responses, responses with ReadableStream) as there is no support for them right now. 36 Call the batch put operation. 37 (WebCore::Cache::remove): 38 Check the request and response as per spec. 39 Call the batch delete operation. 40 (WebCore::Cache::keys): 41 Refresh the request to response map and return corresponding requests. 42 Making sure to reuse the same request objects as per spec. 43 As per spec, the request to response map is ordered. We implement it as a Vector. 44 (WebCore::Cache::refreshRequestToResponseMap): 45 Use the cache storage connection to get an up-to-date list of cached records. 46 (WebCore::Cache::queryCacheMatch): 47 Implements the match algorithm defined in https://www.w3.org/TR/service-workers-1/#query-cache-algorithm. 48 This is split for queryCache as cache storage engine will need to use it when implementing the delete operation. 49 (WebCore::Cache::queryCache): 50 Full implementation of https://www.w3.org/TR/service-workers-1/#query-cache-algorithm with no targetStorage argument. 51 (WebCore::Cache::queryCacheWithTargetStorage): 52 Full implementation of https://www.w3.org/TR/service-workers-1/#query-cache-algorithm with a provided targetStorage argument. 53 (WebCore::Cache::batchDeleteOperation): 54 Implementation of https://www.w3.org/TR/service-workers-1/#batch-cache-operations-algorithm but dedicated to a delete operation. 55 Delete operation are always done one at a time. 56 (WebCore::Cache::batchPutOperation): 57 Implementation of https://www.w3.org/TR/service-workers-1/#batch-cache-operations-algorithm dedicated to a put operation. 58 Put operation takes one record for put but can take several records in the case of addAll, hence the current design. 59 (WebCore::Cache::updateRequestToResponseMap): 60 Update the cache request to response map based on the records retrieved from the cache storage connection. 61 * Modules/cache/Cache.h: 62 (WebCore::Cache::create): 63 (WebCore::Cache::name const): 64 * Modules/cache/Cache.idl: 65 * Modules/cache/CacheStorage.cpp: 66 (WebCore::CacheStorage::origin const): 67 Computing the cache origin that is passed to the CacheStorageConnection. 68 (WebCore::CacheStorage::has): 69 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-has. 70 Call the cache storage connection to refresh its cache map. 71 Then use it to check whether a cache exists. 72 (WebCore::CacheStorage::refreshCacheMap): 73 Use the cache storage connection to get the list of existing caches. 74 (WebCore::CacheStorage::open): 75 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-open. 76 Refreshing the cache map so as to return a pre-existing cache if any. 77 (WebCore::CacheStorage::remove): 78 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-delete-method. 79 Refreshing the cache map so as to do nothing if there is no cache to remove. 80 (WebCore::CacheStorage::keys): 81 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-keys-method. 82 Refreshing the cache map and returnin its keys. 83 As per spec, the cache map is ordered. We implement it as a Vector. 84 (WebCore::CacheStorage::cacheMap): 85 Get the list of cache objects, used as a private accessor for JS built-ins. 86 * Modules/cache/CacheStorage.h: 87 (WebCore::CacheStorage::create): 88 (WebCore::CacheStorage::CacheStorage): 89 * Modules/cache/CacheStorageConnection.cpp: Added. 90 (WebCore::CacheStorageConnection::exceptionFromError): 91 * Modules/cache/CacheStorageConnection.h: Added. 92 Makes the link between Web facing Cache API and the cache storage engine. 93 Envisioned implementation are: 94 - One main thread connection used by all documents in the given process. 95 - One connection per worker that forwards the calls to the main thread and use the main thread connection afterwards. 96 (WebCore::CacheStorageConnection::create): 97 (WebCore::CacheStorageConnection::open): 98 (WebCore::CacheStorageConnection::remove): 99 (WebCore::CacheStorageConnection::refreshCacheMap): 100 (WebCore::CacheStorageConnection::refreshRequestToResponseMap): 101 (WebCore::CacheStorageConnection::batchDeleteOperation): 102 (WebCore::CacheStorageConnection::batchPutOperation): 103 * Modules/cache/CacheStorageRecord.h: Added. A fetch record from the Web facing cache API perspective. 104 * Modules/cache/DOMWindowCaches.cpp: 105 (WebCore::DOMWindowCaches::caches const): 106 * Modules/cache/WorkerGlobalScopeCaches.cpp: 107 (WebCore::WorkerGlobalScopeCaches::from): 108 (WebCore::WorkerGlobalScopeCaches::caches const): 109 * Modules/cache/WorkerGlobalScopeCaches.h: 110 (WebCore::WorkerGlobalScopeCaches::WorkerGlobalScopeCaches): 111 * Modules/fetch/FetchBodyOwner.h: 112 (WebCore::FetchBodyOwner::isReadableStreamBody const): Added getter as it is used by cache API. 113 * Modules/fetch/FetchHeaders.h: 114 (WebCore::FetchHeaders::create): Add another create as used by the cache API. 115 (WebCore::FetchHeaders::guard const): Added getter and IPC serializer as this is something that will be stored by the cache engine. 116 * Modules/fetch/FetchLoader.cpp: 117 (WebCore::FetchLoader::start): 118 * Modules/fetch/FetchRequest.cpp: 119 (WebCore::buildOptions): In case FetchRequest::create is called from C++, there is no need to set init.window to a null value. 120 Add a check so that no value at all is the same as a null/undefined value. 121 (WebCore::FetchRequest::resourceRequest const): 122 * Modules/fetch/FetchRequest.h: 123 * Modules/fetch/FetchResponse.h: 124 * WebCore.xcodeproj/project.pbxproj: 125 * inspector/InspectorOverlay.cpp: 126 (WebCore::InspectorOverlay::overlayPage): 127 * page/CacheStorageProvider.h: Added. 128 Interface to create main thread cache storage connection for the given page. 129 There will be one provider for each process. 130 Passing a sessionID so that we will create a connection per session. 131 * page/Page.cpp: 132 (WebCore::Page::Page): 133 * page/Page.h: 134 (WebCore::Page::cacheStorageProvider): 135 * page/PageConfiguration.cpp: 136 (WebCore::PageConfiguration::PageConfiguration): 137 * page/PageConfiguration.h: 138 * svg/graphics/SVGImage.cpp: 139 (WebCore::SVGImage::dataChanged): 140 1 141 2017-08-15 Chris Dumez <cdumez@apple.com> 2 142 -
trunk/Source/WebCore/Modules/cache/Cache.cpp
r220311 r220758 27 27 #include "Cache.h" 28 28 29 #include "CacheQueryOptions.h" 30 #include "FetchResponse.h" 31 #include "HTTPParsers.h" 32 #include "JSFetchRequest.h" 33 #include "JSFetchResponse.h" 34 #include "ScriptExecutionContext.h" 35 #include "URL.h" 36 29 37 namespace WebCore { 30 38 31 void Cache::match(RequestInfo&&, std::optional<CacheQueryOptions>&&, Ref<DeferredPromise>&& promise) 32 { 33 promise->reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 34 } 35 36 void Cache::matchAll(std::optional<RequestInfo>&&, std::optional<CacheQueryOptions>&&, MatchAllPromise&& promise) 37 { 38 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 39 Cache::Cache(ScriptExecutionContext& context, String&& name, uint64_t identifier, Ref<CacheStorageConnection>&& connection) 40 : ActiveDOMObject(&context) 41 , m_name(WTFMove(name)) 42 , m_identifier(identifier) 43 , m_connection(WTFMove(connection)) 44 { 45 suspendIfNeeded(); 46 } 47 48 Cache::~Cache() 49 { 50 } 51 52 void Cache::match(RequestInfo&& info, CacheQueryOptions&& options, Ref<DeferredPromise>&& promise) 53 { 54 doMatch(WTFMove(info), WTFMove(options), WTFMove(promise), MatchType::OnlyFirst); 55 } 56 57 void Cache::matchAll(std::optional<RequestInfo>&& info, CacheQueryOptions&& options, Ref<DeferredPromise>&& promise) 58 { 59 doMatch(WTFMove(info), WTFMove(options), WTFMove(promise), MatchType::All); 60 } 61 62 void Cache::doMatch(std::optional<RequestInfo>&& info, CacheQueryOptions&& options, Ref<DeferredPromise>&& promise, MatchType matchType) 63 { 64 RefPtr<FetchRequest> request; 65 if (info) { 66 if (WTF::holds_alternative<RefPtr<FetchRequest>>(info.value())) { 67 request = WTF::get<RefPtr<FetchRequest>>(info.value()).releaseNonNull(); 68 if (request->method() != "GET" && !options.ignoreMethod) { 69 if (matchType == MatchType::OnlyFirst) { 70 promise->resolve(); 71 return; 72 } 73 promise->resolve<IDLSequence<IDLInterface<FetchResponse>>>(Vector<Ref<FetchResponse>> { }); 74 return; 75 } 76 } else { 77 if (UNLIKELY(!scriptExecutionContext())) 78 return; 79 request = FetchRequest::create(*scriptExecutionContext(), WTFMove(info.value()), { }).releaseReturnValue(); 80 } 81 } 82 83 if (!request) { 84 ASSERT(matchType == MatchType::All); 85 retrieveRecords([this, promise = WTFMove(promise)]() { 86 Vector<Ref<FetchResponse>> responses; 87 responses.reserveInitialCapacity(m_records.size()); 88 for (auto& record : m_records) 89 responses.uncheckedAppend(record.response->cloneForJS()); 90 promise->resolve<IDLSequence<IDLInterface<FetchResponse>>>(responses); 91 }); 92 return; 93 } 94 queryCache(request.releaseNonNull(), WTFMove(options), [matchType, promise = WTFMove(promise)](const Vector<CacheStorageRecord>& records) mutable { 95 if (matchType == MatchType::OnlyFirst) { 96 if (records.size()) { 97 promise->resolve<IDLInterface<FetchResponse>>(records[0].response->cloneForJS()); 98 return; 99 } 100 promise->resolve(); 101 return; 102 } 103 104 Vector<Ref<FetchResponse>> responses; 105 responses.reserveInitialCapacity(records.size()); 106 for (auto& record : records) 107 responses.uncheckedAppend(record.response->cloneForJS()); 108 promise->resolve<IDLSequence<IDLInterface<FetchResponse>>>(responses); 109 }); 39 110 } 40 111 41 112 void Cache::add(RequestInfo&&, DOMPromiseDeferred<void>&& promise) 42 113 { 43 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")});114 promise.reject(Exception { NotSupportedError, ASCIILiteral("Not implemented")}); 44 115 } 45 116 46 117 void Cache::addAll(Vector<RequestInfo>&&, DOMPromiseDeferred<void>&& promise) 47 118 { 48 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 49 } 50 51 void Cache::put(RequestInfo&&, Ref<FetchResponse>&&, DOMPromiseDeferred<void>&& promise) 52 { 53 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 54 } 55 56 void Cache::remove(RequestInfo&&, std::optional<CacheQueryOptions>&&, DOMPromiseDeferred<IDLBoolean>&& promise) 57 { 58 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 59 } 60 61 void Cache::keys(std::optional<RequestInfo>&&, std::optional<CacheQueryOptions>&&, KeysPromise&& promise) 62 { 63 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 119 promise.reject(Exception { NotSupportedError, ASCIILiteral("Not implemented")}); 120 } 121 122 void Cache::put(RequestInfo&& info, Ref<FetchResponse>&& response, DOMPromiseDeferred<void>&& promise) 123 { 124 RefPtr<FetchRequest> request; 125 if (WTF::holds_alternative<RefPtr<FetchRequest>>(info)) { 126 request = WTF::get<RefPtr<FetchRequest>>(info).releaseNonNull(); 127 if (request->method() != "GET") { 128 promise.reject(Exception { TypeError, ASCIILiteral("Request method is not GET") }); 129 return; 130 } 131 } else { 132 if (UNLIKELY(!scriptExecutionContext())) 133 return; 134 request = FetchRequest::create(*scriptExecutionContext(), WTFMove(info), { }).releaseReturnValue(); 135 } 136 137 if (!protocolIsInHTTPFamily(request->url())) { 138 promise.reject(Exception { TypeError, ASCIILiteral("Request url is not HTTP/HTTPS") }); 139 return; 140 } 141 142 // FIXME: This is inefficient, we should be able to split and trim whitespaces at the same time. 143 auto varyValue = response->headers().internalHeaders().get(WebCore::HTTPHeaderName::Vary); 144 Vector<String> varyHeaderNames; 145 varyValue.split(',', false, varyHeaderNames); 146 for (auto& name : varyHeaderNames) { 147 if (stripLeadingAndTrailingHTTPSpaces(name) == "*") { 148 promise.reject(Exception { TypeError, ASCIILiteral("Response has a '*' Vary header value") }); 149 return; 150 } 151 } 152 153 if (response->isDisturbed()) { 154 promise.reject(Exception { TypeError, ASCIILiteral("Response is disturbed or locked") }); 155 return; 156 } 157 158 if (response->status() == 206) { 159 promise.reject(Exception { TypeError, ASCIILiteral("Response is a 206 partial") }); 160 return; 161 } 162 163 // FIXME: Add support for being loaded responses. 164 if (response->isLoading()) { 165 promise.reject(Exception { NotSupportedError, ASCIILiteral("Caching a loading Response is not yet supported") }); 166 return; 167 } 168 169 // FIXME: Add support for ReadableStream. 170 if (response->isReadableStreamBody()) { 171 promise.reject(Exception { NotSupportedError, ASCIILiteral("Caching a Response with data stored in a ReadableStream is not yet supported") }); 172 return; 173 } 174 175 batchPutOperation(*request, response.get(), [promise = WTFMove(promise)](CacheStorageConnection::Error error) mutable { 176 if (error != CacheStorageConnection::Error::None) { 177 promise.reject(CacheStorageConnection::exceptionFromError(error)); 178 return; 179 } 180 promise.resolve(); 181 }); 182 } 183 184 void Cache::remove(RequestInfo&& info, CacheQueryOptions&& options, DOMPromiseDeferred<IDLBoolean>&& promise) 185 { 186 RefPtr<FetchRequest> request; 187 if (WTF::holds_alternative<RefPtr<FetchRequest>>(info)) { 188 request = WTF::get<RefPtr<FetchRequest>>(info).releaseNonNull(); 189 if (request->method() != "GET" && !options.ignoreMethod) { 190 promise.resolve(false); 191 return; 192 } 193 } else { 194 if (UNLIKELY(!scriptExecutionContext())) 195 return; 196 request = FetchRequest::create(*scriptExecutionContext(), WTFMove(info), { }).releaseReturnValue(); 197 } 198 199 batchDeleteOperation(*request, WTFMove(options), [promise = WTFMove(promise)](bool didDelete, CacheStorageConnection::Error error) mutable { 200 if (error != CacheStorageConnection::Error::None) { 201 promise.reject(CacheStorageConnection::exceptionFromError(error)); 202 return; 203 } 204 promise.resolve(didDelete); 205 }); 206 } 207 208 void Cache::keys(std::optional<RequestInfo>&& info, CacheQueryOptions&& options, KeysPromise&& promise) 209 { 210 RefPtr<FetchRequest> request; 211 if (info) { 212 if (WTF::holds_alternative<RefPtr<FetchRequest>>(info.value())) { 213 request = WTF::get<RefPtr<FetchRequest>>(info.value()).releaseNonNull(); 214 if (request->method() != "GET" && !options.ignoreMethod) { 215 promise.resolve(Vector<Ref<FetchRequest>> { }); 216 return; 217 } 218 } else { 219 if (UNLIKELY(!scriptExecutionContext())) 220 return; 221 request = FetchRequest::create(*scriptExecutionContext(), WTFMove(info.value()), { }).releaseReturnValue(); 222 } 223 } 224 225 if (!request) { 226 retrieveRecords([this, promise = WTFMove(promise)]() mutable { 227 Vector<Ref<FetchRequest>> requests; 228 requests.reserveInitialCapacity(m_records.size()); 229 for (auto& record : m_records) 230 requests.uncheckedAppend(record.request.copyRef()); 231 promise.resolve(requests); 232 }); 233 return; 234 } 235 236 queryCache(request.releaseNonNull(), WTFMove(options), [promise = WTFMove(promise)](const Vector<CacheStorageRecord>& records) mutable { 237 Vector<Ref<FetchRequest>> requests; 238 requests.reserveInitialCapacity(records.size()); 239 for (auto& record : records) 240 requests.uncheckedAppend(record.request.copyRef()); 241 promise.resolve(requests); 242 }); 243 } 244 245 void Cache::retrieveRecords(WTF::Function<void()>&& callback) 246 { 247 setPendingActivity(this); 248 m_connection->retrieveRecords(m_identifier, [this, callback = WTFMove(callback)](Vector<CacheStorageConnection::Record>&& records) { 249 if (!m_isStopped) { 250 updateRecords(WTFMove(records)); 251 callback(); 252 } 253 unsetPendingActivity(this); 254 }); 255 } 256 257 void Cache::queryCache(Ref<FetchRequest>&& request, CacheQueryOptions&& options, WTF::Function<void(const Vector<CacheStorageRecord>&)>&& callback) 258 { 259 retrieveRecords([this, request = WTFMove(request), options = WTFMove(options), callback = WTFMove(callback)]() mutable { 260 callback(queryCacheWithTargetStorage(request.get(), options, m_records)); 261 }); 262 } 263 264 static inline bool queryCacheMatch(const FetchRequest& request, const FetchRequest& cachedRequest, const ResourceResponse& cachedResponse, const CacheQueryOptions& options) 265 { 266 // We need to pass the resource request with all correct headers hence why we call resourceRequest(). 267 return CacheStorageConnection::queryCacheMatch(request.resourceRequest(), cachedRequest.resourceRequest(), cachedResponse, options); 268 } 269 270 Vector<CacheStorageRecord> Cache::queryCacheWithTargetStorage(const FetchRequest& request, const CacheQueryOptions& options, const Vector<CacheStorageRecord>& targetStorage) 271 { 272 if (!options.ignoreMethod && request.method() != "GET") 273 return { }; 274 275 Vector<CacheStorageRecord> records; 276 for (auto& record : targetStorage) { 277 if (queryCacheMatch(request, record.request.get(), record.response->resourceResponse(), options)) 278 records.append({ record.identifier, record.request.copyRef(), record.response.copyRef() }); 279 } 280 return records; 281 } 282 283 void Cache::batchDeleteOperation(const FetchRequest& request, CacheQueryOptions&& options, WTF::Function<void(bool didRemoval, CacheStorageConnection::Error error)>&& callback) 284 { 285 setPendingActivity(this); 286 m_connection->batchDeleteOperation(m_identifier, request.internalRequest(), WTFMove(options), [this, callback = WTFMove(callback)](Vector<uint64_t>&& records, CacheStorageConnection::Error error) { 287 if (!m_isStopped) { 288 if (error == CacheStorageConnection::Error::None) 289 m_records.removeAllMatching([&](const auto& item) { return records.contains(item.identifier); }); 290 291 callback(!records.isEmpty(), error); 292 } 293 unsetPendingActivity(this); 294 }); 295 } 296 297 static inline CacheStorageConnection::Record toConnectionRecord(const FetchRequest& request, FetchResponse& response) 298 { 299 // FIXME: Add a setHTTPHeaderFields on ResourceResponseBase. 300 ResourceResponse cachedResponse = response.resourceResponse(); 301 for (auto& header : response.headers().internalHeaders()) 302 cachedResponse.setHTTPHeaderField(header.key, header.value); 303 304 ResourceRequest cachedRequest = request.internalRequest(); 305 cachedRequest.setHTTPHeaderFields(request.headers().internalHeaders()); 306 307 return { 0, 308 request.headers().guard(), WTFMove(cachedRequest), request.fetchOptions(), request.internalRequestReferrer(), 309 response.headers().guard(), WTFMove(cachedResponse) 310 }; 311 } 312 313 void Cache::batchPutOperation(const FetchRequest& request, FetchResponse& response, WTF::Function<void(CacheStorageConnection::Error)>&& callback) 314 { 315 Vector<CacheStorageConnection::Record> records; 316 records.append(toConnectionRecord(request, response)); 317 318 setPendingActivity(this); 319 m_connection->batchPutOperation(m_identifier, WTFMove(records), [this, callback = WTFMove(callback)](Vector<uint64_t>&&, CacheStorageConnection::Error error) { 320 if (!m_isStopped) 321 callback(error); 322 323 unsetPendingActivity(this); 324 }); 325 } 326 327 void Cache::updateRecords(Vector<CacheStorageConnection::Record>&& records) 328 { 329 ASSERT(scriptExecutionContext()); 330 Vector<CacheStorageRecord> newRecords; 331 332 for (auto& record : records) { 333 size_t index = m_records.findMatching([&](const auto& item) { return item.identifier == record.identifier; }); 334 if (index != notFound) 335 newRecords.append(WTFMove(m_records[index])); 336 else { 337 auto requestHeaders = FetchHeaders::create(record.requestHeadersGuard, HTTPHeaderMap { record.request.httpHeaderFields() }); 338 FetchRequest::InternalRequest internalRequest = { WTFMove(record.request), WTFMove(record.options), WTFMove(record.referrer) }; 339 auto request = FetchRequest::create(*scriptExecutionContext(), std::nullopt, WTFMove(requestHeaders), WTFMove(internalRequest)); 340 341 auto responseHeaders = FetchHeaders::create(record.responseHeadersGuard, HTTPHeaderMap { record.response.httpHeaderFields() }); 342 auto response = FetchResponse::create(*scriptExecutionContext(), std::nullopt, WTFMove(responseHeaders), WTFMove(record.response)); 343 344 newRecords.append(CacheStorageRecord { record.identifier, WTFMove(request), WTFMove(response) }); 345 } 346 } 347 m_records = WTFMove(newRecords); 348 } 349 350 void Cache::stop() 351 { 352 m_isStopped = true; 353 } 354 355 const char* Cache::activeDOMObjectName() const 356 { 357 return "Cache"; 358 } 359 360 bool Cache::canSuspendForDocumentSuspension() const 361 { 362 return m_records.isEmpty() && !hasPendingActivity(); 64 363 } 65 364 -
trunk/Source/WebCore/Modules/cache/Cache.h
r220311 r220758 26 26 #pragma once 27 27 28 #include "FetchRequest.h" 28 #include "ActiveDOMObject.h" 29 #include "CacheStorageConnection.h" 30 #include "CacheStorageRecord.h" 29 31 30 32 namespace WebCore { 31 33 32 class FetchResponse;34 class ScriptExecutionContext; 33 35 34 struct CacheQueryOptions; 35 36 class Cache : public RefCounted<Cache> { 36 class Cache final : public RefCounted<Cache>, public ActiveDOMObject { 37 37 public: 38 static Ref<Cache> create(String&& name) { return adoptRef(*new Cache(WTFMove(name))); } 38 static Ref<Cache> create(ScriptExecutionContext& context, String&& name, uint64_t identifier, Ref<CacheStorageConnection>&& connection) { return adoptRef(*new Cache(context, WTFMove(name), identifier, WTFMove(connection))); } 39 ~Cache(); 39 40 40 41 using RequestInfo = FetchRequest::Info; 41 42 42 using MatchAllPromise = DOMPromiseDeferred<IDLSequence<IDLInterface<FetchResponse>>>;43 43 using KeysPromise = DOMPromiseDeferred<IDLSequence<IDLInterface<FetchRequest>>>; 44 44 45 void match(RequestInfo&&, std::optional<CacheQueryOptions>&&, Ref<DeferredPromise>&&);46 void matchAll(std::optional<RequestInfo>&&, std::optional<CacheQueryOptions>&&, MatchAllPromise&&);45 void match(RequestInfo&&, CacheQueryOptions&&, Ref<DeferredPromise>&&); 46 void matchAll(std::optional<RequestInfo>&&, CacheQueryOptions&&, Ref<DeferredPromise>&&); 47 47 void add(RequestInfo&&, DOMPromiseDeferred<void>&&); 48 48 49 49 void addAll(Vector<RequestInfo>&&, DOMPromiseDeferred<void>&&); 50 50 void put(RequestInfo&&, Ref<FetchResponse>&&, DOMPromiseDeferred<void>&&); 51 void remove(RequestInfo&&, std::optional<CacheQueryOptions>&&, DOMPromiseDeferred<IDLBoolean>&&); 52 void keys(std::optional<RequestInfo>&&, std::optional<CacheQueryOptions>&&, KeysPromise&&); 51 void remove(RequestInfo&&, CacheQueryOptions&&, DOMPromiseDeferred<IDLBoolean>&&); 52 void keys(std::optional<RequestInfo>&&, CacheQueryOptions&&, KeysPromise&&); 53 54 const String& name() const { return m_name; } 55 uint64_t identifier() const { return m_identifier; } 53 56 54 57 private: 55 explicit Cache(String&& name) : m_name(WTFMove(name)) { } 58 Cache(ScriptExecutionContext&, String&& name, uint64_t identifier, Ref<CacheStorageConnection>&&); 59 60 enum class MatchType { All, OnlyFirst }; 61 void doMatch(std::optional<RequestInfo>&&, CacheQueryOptions&&, Ref<DeferredPromise>&&, MatchType); 62 63 // ActiveDOMObject 64 void stop() final; 65 const char* activeDOMObjectName() const final; 66 bool canSuspendForDocumentSuspension() const final; 67 68 void retrieveRecords(WTF::Function<void()>&&); 69 Vector<CacheStorageRecord> queryCacheWithTargetStorage(const FetchRequest&, const CacheQueryOptions&, const Vector<CacheStorageRecord>&); 70 void queryCache(Ref<FetchRequest>&&, CacheQueryOptions&&, WTF::Function<void(const Vector<CacheStorageRecord>&)>&&); 71 void batchDeleteOperation(const FetchRequest&, CacheQueryOptions&&, WTF::Function<void(bool didRemoval, CacheStorageConnection::Error)>&&); 72 void batchPutOperation(const FetchRequest&, FetchResponse&, WTF::Function<void(CacheStorageConnection::Error)>&&); 73 74 void updateRecords(Vector<CacheStorageConnection::Record>&&); 56 75 57 76 String m_name; 77 uint64_t m_identifier; 78 Ref<CacheStorageConnection> m_connection; 79 80 Vector<CacheStorageRecord> m_records; 81 bool m_isStopped { false }; 58 82 }; 59 83 -
trunk/Source/WebCore/Modules/cache/Cache.idl
r220311 r220758 30 30 Exposed=(Window,Worker), 31 31 EnabledAtRuntime=CacheAPI, 32 ImplementationLacksVTable,33 32 ] interface Cache { 34 33 [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); -
trunk/Source/WebCore/Modules/cache/CacheStorage.cpp
r220311 r220758 27 27 #include "CacheStorage.h" 28 28 29 #include "CacheQueryOptions.h" 30 #include "JSCache.h" 31 #include "ScriptExecutionContext.h" 32 29 33 namespace WebCore { 30 34 31 void CacheStorage::match(RequestInfo&&, std::optional<CacheQueryOptions>&&, Ref<DeferredPromise>&& promise) 35 CacheStorage::CacheStorage(ScriptExecutionContext& context, Ref<CacheStorageConnection>&& connection) 36 : ActiveDOMObject(&context) 37 , m_connection(WTFMove(connection)) 32 38 { 33 promise->reject(Exception { TypeError, ASCIILiteral("Not implemented")});39 suspendIfNeeded(); 34 40 } 35 41 36 void CacheStorage::has(const String&, DOMPromiseDeferred<IDLBoolean>&& promise) 42 String CacheStorage::origin() const 37 43 { 38 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 44 // FIXME: Do we really need to check for origin being null? 45 auto* origin = scriptExecutionContext() ? scriptExecutionContext()->securityOrigin() : nullptr; 46 return origin ? origin->toString() : String(); 39 47 } 40 48 41 void CacheStorage:: open(const String&, DOMPromiseDeferred<IDLInterface<Cache>>&& promise)49 void CacheStorage::match(Cache::RequestInfo&&, CacheQueryOptions&&, Ref<DeferredPromise>&& promise) 42 50 { 43 promise .reject(Exception { TypeError, ASCIILiteral("Not implemented")});51 promise->reject(Exception { NotSupportedError, ASCIILiteral("Not implemented")}); 44 52 } 45 53 46 void CacheStorage:: remove(const String&, DOMPromiseDeferred<IDLBoolean>&& promise)54 void CacheStorage::has(const String& name, DOMPromiseDeferred<IDLBoolean>&& promise) 47 55 { 48 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 56 retrieveCaches([this, name, promise = WTFMove(promise)]() mutable { 57 promise.resolve(m_caches.findMatching([&](auto& item) { return item->name() == name; }) != notFound); 58 }); 59 } 60 61 void CacheStorage::retrieveCaches(WTF::Function<void()>&& callback) 62 { 63 String origin = this->origin(); 64 if (origin.isNull()) 65 return; 66 67 setPendingActivity(this); 68 m_connection->retrieveCaches(origin, [this, callback = WTFMove(callback)](Vector<CacheStorageConnection::CacheInfo>&& cachesInfo) { 69 if (!m_isStopped) { 70 ASSERT(scriptExecutionContext()); 71 m_caches.removeAllMatching([&](auto& cache) { 72 return cachesInfo.findMatching([&](const auto& info) { return info.identifier == cache->identifier(); }) == notFound; 73 }); 74 for (auto& info : cachesInfo) { 75 if (m_caches.findMatching([&](const auto& cache) { return info.identifier == cache->identifier(); }) == notFound) 76 m_caches.append(Cache::create(*scriptExecutionContext(), WTFMove(info.name), info.identifier, m_connection.copyRef())); 77 } 78 79 std::sort(m_caches.begin(), m_caches.end(), [&](auto& a, auto& b) { 80 return a->identifier() < b->identifier(); 81 }); 82 83 callback(); 84 } 85 unsetPendingActivity(this); 86 }); 87 } 88 89 void CacheStorage::open(const String& name, DOMPromiseDeferred<IDLInterface<Cache>>&& promise) 90 { 91 retrieveCaches([this, name, promise = WTFMove(promise)]() mutable { 92 auto position = m_caches.findMatching([&](auto& item) { return item->name() == name; }); 93 if (position != notFound) { 94 auto& cache = m_caches[position]; 95 promise.resolve(Cache::create(*scriptExecutionContext(), String { cache->name() }, cache->identifier(), m_connection.copyRef())); 96 return; 97 } 98 99 String origin = this->origin(); 100 ASSERT(!origin.isNull()); 101 102 setPendingActivity(this); 103 m_connection->open(origin, name, [this, name, promise = WTFMove(promise)](uint64_t cacheIdentifier, CacheStorageConnection::Error error) mutable { 104 if (!m_isStopped) { 105 if (error != CacheStorageConnection::Error::None) 106 promise.reject(CacheStorageConnection::exceptionFromError(error)); 107 else { 108 auto cache = Cache::create(*scriptExecutionContext(), String { name }, cacheIdentifier, m_connection.copyRef()); 109 promise.resolve(cache); 110 m_caches.append(WTFMove(cache)); 111 } 112 } 113 unsetPendingActivity(this); 114 }); 115 }); 116 } 117 118 void CacheStorage::remove(const String& name, DOMPromiseDeferred<IDLBoolean>&& promise) 119 { 120 retrieveCaches([this, name, promise = WTFMove(promise)]() mutable { 121 auto position = m_caches.findMatching([&](auto& item) { return item->name() == name; }); 122 if (position == notFound) { 123 promise.resolve(false); 124 return; 125 } 126 127 String origin = this->origin(); 128 ASSERT(!origin.isNull()); 129 130 setPendingActivity(this); 131 m_connection->remove(m_caches[position]->identifier(), [this, name, promise = WTFMove(promise)](uint64_t cacheIdentifier, CacheStorageConnection::Error error) mutable { 132 UNUSED_PARAM(cacheIdentifier); 133 if (!m_isStopped) { 134 if (error != CacheStorageConnection::Error::None) 135 promise.reject(CacheStorageConnection::exceptionFromError(error)); 136 else 137 promise.resolve(true); 138 } 139 unsetPendingActivity(this); 140 }); 141 m_caches.remove(position); 142 }); 49 143 } 50 144 51 145 void CacheStorage::keys(KeysPromise&& promise) 52 146 { 53 promise.reject(Exception { TypeError, ASCIILiteral("Not implemented")}); 147 retrieveCaches([this, promise = WTFMove(promise)]() mutable { 148 Vector<String> keys; 149 keys.reserveInitialCapacity(m_caches.size()); 150 for (auto& cache : m_caches) 151 keys.uncheckedAppend(cache->name()); 152 promise.resolve(keys); 153 }); 154 } 155 156 void CacheStorage::stop() 157 { 158 m_isStopped = true; 159 } 160 161 const char* CacheStorage::activeDOMObjectName() const 162 { 163 return "CacheStorage"; 164 } 165 166 bool CacheStorage::canSuspendForDocumentSuspension() const 167 { 168 return !hasPendingActivity(); 54 169 } 55 170 -
trunk/Source/WebCore/Modules/cache/CacheStorage.h
r220311 r220758 26 26 #pragma once 27 27 28 #include "Cache.h" 29 #include "CacheStorageConnection.h" 28 30 #include "FetchRequest.h" 31 #include <wtf/Forward.h> 29 32 30 33 namespace WebCore { 31 34 32 class Cache; 35 class CacheStorage : public RefCounted<CacheStorage>, public ActiveDOMObject { 36 public: 37 static Ref<CacheStorage> create(ScriptExecutionContext& context, Ref<CacheStorageConnection>&& connection) { return adoptRef(*new CacheStorage(context, WTFMove(connection))); } 33 38 34 struct CacheQueryOptions;35 36 class CacheStorage : public RefCounted<CacheStorage> {37 public:38 static Ref<CacheStorage> create() { return adoptRef(*new CacheStorage()); }39 40 using RequestInfo = FetchRequest::Info;41 39 using KeysPromise = DOMPromiseDeferred<IDLSequence<IDLDOMString>>; 42 40 43 void match( RequestInfo&&, std::optional<CacheQueryOptions>&&, Ref<DeferredPromise>&&);41 void match(Cache::RequestInfo&&, CacheQueryOptions&&, Ref<DeferredPromise>&&); 44 42 void has(const String&, DOMPromiseDeferred<IDLBoolean>&&); 45 43 void open(const String&, DOMPromiseDeferred<IDLInterface<Cache>>&&); … … 48 46 49 47 private: 50 CacheStorage() = default; 48 CacheStorage(ScriptExecutionContext&, Ref<CacheStorageConnection>&&); 49 50 // ActiveDOMObject 51 void stop() final; 52 const char* activeDOMObjectName() const final; 53 bool canSuspendForDocumentSuspension() const final; 54 55 void retrieveCaches(WTF::Function<void()>&&); 56 String origin() const; 57 58 Vector<Ref<Cache>> m_caches; 59 Ref<CacheStorageConnection> m_connection; 60 bool m_isStopped { false }; 51 61 }; 52 62 -
trunk/Source/WebCore/Modules/cache/CacheStorage.idl
r220311 r220758 30 30 Exposed=(Window,Worker), 31 31 EnabledAtRuntime=CacheAPI, 32 ImplementationLacksVTable,33 32 ] interface CacheStorage { 34 33 [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); -
trunk/Source/WebCore/Modules/cache/CacheStorageRecord.h
r220754 r220758 26 26 #pragma once 27 27 28 #include "Supplementable.h" 28 #include "FetchRequest.h" 29 #include "FetchResponse.h" 29 30 30 31 namespace WebCore { 31 32 32 class CacheStorage; 33 class WorkerGlobalScope;33 struct CacheStorageRecord { 34 uint64_t identifier; 34 35 35 class WorkerGlobalScopeCaches : public Supplement<WorkerGlobalScope> { 36 public: 37 WorkerGlobalScopeCaches() = default; 38 39 static CacheStorage* caches(WorkerGlobalScope&); 40 41 private: 42 static WorkerGlobalScopeCaches* from(WorkerGlobalScope&); 43 static const char* supplementName(); 44 CacheStorage* caches() const; 45 46 mutable RefPtr<CacheStorage> m_caches; 36 Ref<FetchRequest> request; 37 Ref<FetchResponse> response; 47 38 }; 48 39 49 40 } // namespace WebCore 50 -
trunk/Source/WebCore/Modules/cache/DOMWindowCaches.cpp
r220311 r220758 28 28 29 29 #include "CacheStorage.h" 30 #include "CacheStorageProvider.h" 30 31 #include "DOMWindow.h" 32 #include "Document.h" 33 #include "Frame.h" 34 #include "Page.h" 31 35 32 36 namespace WebCore { … … 55 59 CacheStorage* DOMWindowCaches::caches(DOMWindow& window) 56 60 { 61 if (!window.isCurrentlyDisplayedInFrame()) 62 return nullptr; 63 57 64 return DOMWindowCaches::from(&window)->caches(); 58 65 } … … 60 67 CacheStorage* DOMWindowCaches::caches() const 61 68 { 62 if (!m_caches && frame()) 63 m_caches = CacheStorage::create(); 69 ASSERT(frame()); 70 ASSERT(frame()->document()); 71 if (!m_caches && frame()->page()) 72 m_caches = CacheStorage::create(*frame()->document(), frame()->page()->cacheStorageProvider().createCacheStorageConnection(frame()->page()->sessionID())); 64 73 return m_caches.get(); 65 74 } -
trunk/Source/WebCore/Modules/cache/WorkerGlobalScopeCaches.cpp
r220311 r220758 41 41 auto* supplement = static_cast<WorkerGlobalScopeCaches*>(Supplement<WorkerGlobalScope>::from(&scope, supplementName())); 42 42 if (!supplement) { 43 auto newSupplement = std::make_unique<WorkerGlobalScopeCaches>( );43 auto newSupplement = std::make_unique<WorkerGlobalScopeCaches>(scope); 44 44 supplement = newSupplement.get(); 45 45 provideTo(&scope, supplementName(), WTFMove(newSupplement)); … … 56 56 { 57 57 if (!m_caches) 58 m_caches = CacheStorage::create( );58 m_caches = CacheStorage::create(m_scope, CacheStorageConnection::create()); 59 59 return m_caches.get(); 60 60 } -
trunk/Source/WebCore/Modules/cache/WorkerGlobalScopeCaches.h
r220311 r220758 35 35 class WorkerGlobalScopeCaches : public Supplement<WorkerGlobalScope> { 36 36 public: 37 WorkerGlobalScopeCaches() = default; 37 explicit WorkerGlobalScopeCaches(WorkerGlobalScope& scope) 38 : m_scope(scope) 39 { 40 } 38 41 39 42 static CacheStorage* caches(WorkerGlobalScope&); … … 44 47 CacheStorage* caches() const; 45 48 49 WorkerGlobalScope& m_scope; 46 50 mutable RefPtr<CacheStorage> m_caches; 47 51 }; -
trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h
r220751 r220758 58 58 bool isActive() const { return !!m_blobLoader; } 59 59 60 bool isReadableStreamBody() const { return m_body && m_body->isReadableStream(); } 61 60 62 protected: 61 63 const FetchBody& body() const { return *m_body; } -
trunk/Source/WebCore/Modules/fetch/FetchHeaders.h
r220241 r220758 31 31 #include "ExceptionOr.h" 32 32 #include "HTTPHeaderMap.h" 33 #include <wtf/EnumTraits.h> 33 34 #include <wtf/HashTraits.h> 34 35 #include <wtf/Variant.h> … … 50 51 static ExceptionOr<Ref<FetchHeaders>> create(std::optional<Init>&&); 51 52 52 static Ref<FetchHeaders> create(Guard guard = Guard::None ) { return adoptRef(*new FetchHeaders { guard}); }53 static Ref<FetchHeaders> create(Guard guard = Guard::None, HTTPHeaderMap&& headers = { }) { return adoptRef(*new FetchHeaders { guard, WTFMove(headers) }); } 53 54 static Ref<FetchHeaders> create(const FetchHeaders& headers) { return adoptRef(*new FetchHeaders { headers }); } 54 55 … … 83 84 84 85 void setGuard(Guard); 86 Guard guard() const { return m_guard; } 85 87 86 88 private: 87 explicit FetchHeaders(Guard guard, HTTPHeaderMap&& headers = { });89 FetchHeaders(Guard, HTTPHeaderMap&&); 88 90 FetchHeaders(const FetchHeaders&); 89 91 … … 112 114 113 115 } // namespace WebCore 116 117 namespace WTF { 118 119 template<> struct EnumTraits<WebCore::FetchHeaders::Guard> { 120 using values = EnumValues< 121 WebCore::FetchHeaders::Guard, 122 WebCore::FetchHeaders::Guard::None, 123 WebCore::FetchHeaders::Guard::Immutable, 124 WebCore::FetchHeaders::Guard::Request, 125 WebCore::FetchHeaders::Guard::RequestNoCors, 126 WebCore::FetchHeaders::Guard::Response 127 >; 128 }; 129 130 } -
trunk/Source/WebCore/Modules/fetch/FetchLoader.cpp
r220751 r220758 82 82 options.sameOriginDataURLFlag = SameOriginDataURLFlag::Set; 83 83 84 ResourceRequest fetchRequest = request. internalRequest();84 ResourceRequest fetchRequest = request.resourceRequest(); 85 85 86 86 ASSERT(context.contentSecurityPolicy()); -
trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp
r220244 r220758 75 75 static std::optional<Exception> buildOptions(FetchRequest::InternalRequest& request, ScriptExecutionContext& context, const FetchRequest::Init& init) 76 76 { 77 if (!init.window.isUndefinedOrNull() )77 if (!init.window.isUndefinedOrNull() && !init.window.isEmpty()) 78 78 return Exception { TypeError, ASCIILiteral("Window can only be null.") }; 79 79 … … 258 258 } 259 259 260 const String& FetchRequest::url () const260 const String& FetchRequest::urlString() const 261 261 { 262 262 if (m_requestURL.isNull()) … … 265 265 } 266 266 267 ResourceRequest FetchRequest:: internalRequest() const267 ResourceRequest FetchRequest::resourceRequest() const 268 268 { 269 269 ASSERT(scriptExecutionContext()); -
trunk/Source/WebCore/Modules/fetch/FetchRequest.h
r220244 r220758 54 54 using Type = FetchOptions::Type; 55 55 56 struct InternalRequest { 57 ResourceRequest request; 58 FetchOptions options; 59 String referrer; 60 }; 61 56 62 static ExceptionOr<Ref<FetchRequest>> create(ScriptExecutionContext&, Info&&, Init&&); 63 static Ref<FetchRequest> create(ScriptExecutionContext& context, std::optional<FetchBody>&& body, Ref<FetchHeaders>&& headers, InternalRequest&& request) { return adoptRef(*new FetchRequest(context, WTFMove(body), WTFMove(headers), WTFMove(request))); } 57 64 58 65 const String& method() const { return m_internalRequest.request.httpMethod(); } 59 const String& url () const;66 const String& urlString() const; 60 67 FetchHeaders& headers() { return m_headers.get(); } 68 const FetchHeaders& headers() const { return m_headers.get(); } 61 69 62 70 Type type() const; … … 74 82 ExceptionOr<Ref<FetchRequest>> clone(ScriptExecutionContext&); 75 83 76 struct InternalRequest {77 ResourceRequest request;78 FetchOptions options;79 String referrer;80 };81 82 84 const FetchOptions& fetchOptions() const { return m_internalRequest.options; } 83 ResourceRequest internalRequest() const; 85 const ResourceRequest& internalRequest() const { return m_internalRequest.request; } 86 const String& internalRequestReferrer() const { return m_internalRequest.referrer; } 87 const URL& url() const { return m_internalRequest.request.url(); } 84 88 bool isBodyReadableStream() const { return !isBodyNull() && body().isReadableStream(); } 85 89 86 const String& internalRequestReferrer() const { return m_internalRequest.referrer; }90 ResourceRequest resourceRequest() const; 87 91 88 92 private: -
trunk/Source/WebCore/Modules/fetch/FetchRequest.idl
r220244 r220758 45 45 ] interface FetchRequest { 46 46 readonly attribute ByteString method; 47 readonly attribute USVString url;47 [ImplementedAs=urlString] readonly attribute USVString url; 48 48 readonly attribute FetchHeaders headers; // FIXME: Should be [SameObject]. 49 49 -
trunk/Source/WebCore/Modules/fetch/FetchResponse.h
r220751 r220758 58 58 static ExceptionOr<Ref<FetchResponse>> redirect(ScriptExecutionContext&, const String& url, int status); 59 59 60 static Ref<FetchResponse> create(ScriptExecutionContext& context, std::optional<FetchBody>&& body, Ref<FetchHeaders>&& headers, ResourceResponse&& response) { return adoptRef(*new FetchResponse(context, WTFMove(body), WTFMove(headers), WTFMove(response))); } 61 60 62 using FetchPromise = DOMPromiseDeferred<IDLInterface<FetchResponse>>; 61 63 static void fetch(ScriptExecutionContext&, FetchRequest&, FetchPromise&&); … … 79 81 const String& statusText() const { return m_response.httpStatusText(); } 80 82 83 const FetchHeaders& headers() const { return m_headers; } 81 84 FetchHeaders& headers() { return m_headers; } 82 85 Ref<FetchResponse> cloneForJS(); … … 90 93 91 94 bool isLoading() const { return !!m_bodyLoader; } 95 96 const ResourceResponse& resourceResponse() const { return m_response; } 92 97 93 98 private: -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r220751 r220758 1785 1785 41D015CA0F4B5C71004A662F /* ContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D015C80F4B5C71004A662F /* ContentType.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1786 1786 41D015CB0F4B5C71004A662F /* ContentType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41D015C90F4B5C71004A662F /* ContentType.cpp */; }; 1787 41D129CE1F3D0EF600D15E47 /* WorkerGlobalScopeCaches.h in Headers */ = {isa = PBXBuildFile; fileRef = 41FB278D1F34C28200795487 /* WorkerGlobalScopeCaches.h */; }; 1788 41D129CF1F3D0EFE00D15E47 /* CacheStorageConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41D129C91F3D0EE300D15E47 /* CacheStorageConnection.cpp */; }; 1789 41D129D01F3D0F0500D15E47 /* CacheQueryOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 41FB279B1F34CEF000795487 /* CacheQueryOptions.h */; }; 1790 41D129D11F3D0F0E00D15E47 /* DOMWindowCaches.h in Headers */ = {isa = PBXBuildFile; fileRef = 41FB278C1F34C28200795487 /* DOMWindowCaches.h */; }; 1791 41D129D21F3D0F1200D15E47 /* CacheStorageRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D129CA1F3D0EE300D15E47 /* CacheStorageRecord.h */; }; 1792 41D129D31F3D0F1600D15E47 /* CacheStorageConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D129CC1F3D0EE300D15E47 /* CacheStorageConnection.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1793 41D129D51F3D0F6900D15E47 /* CacheStorageProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D129D41F3D0F6600D15E47 /* CacheStorageProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1794 41D129DB1F3D143800D15E47 /* FetchHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F54F831C50C4F600338488 /* FetchHeaders.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1787 1795 41DEFCB51E56C1BD000D9E5F /* JSDOMMapLike.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DEFCB31E56C1B9000D9E5F /* JSDOMMapLike.cpp */; }; 1788 1796 41DEFCB61E56C1BD000D9E5F /* JSDOMMapLike.h in Headers */ = {isa = PBXBuildFile; fileRef = 41DEFCB41E56C1B9000D9E5F /* JSDOMMapLike.h */; }; … … 9463 9471 41D015C80F4B5C71004A662F /* ContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentType.h; sourceTree = "<group>"; }; 9464 9472 41D015C90F4B5C71004A662F /* ContentType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentType.cpp; sourceTree = "<group>"; }; 9473 41D129C91F3D0EE300D15E47 /* CacheStorageConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CacheStorageConnection.cpp; sourceTree = "<group>"; }; 9474 41D129CA1F3D0EE300D15E47 /* CacheStorageRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheStorageRecord.h; sourceTree = "<group>"; }; 9475 41D129CC1F3D0EE300D15E47 /* CacheStorageConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheStorageConnection.h; sourceTree = "<group>"; }; 9476 41D129D41F3D0F6600D15E47 /* CacheStorageProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheStorageProvider.h; sourceTree = "<group>"; }; 9465 9477 41D51BB21E4E2E8100131A5B /* LibWebRTCAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCAudioFormat.h; path = libwebrtc/LibWebRTCAudioFormat.h; sourceTree = "<group>"; }; 9466 9478 41DEFCB21E56C1B9000D9E5F /* JSDOMBindingInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = JSDOMBindingInternals.js; sourceTree = "<group>"; }; … … 17668 17680 41380C221F34369000155FDA /* CacheStorage.h */, 17669 17681 41380C241F34369700155FDA /* CacheStorage.idl */, 17682 41D129C91F3D0EE300D15E47 /* CacheStorageConnection.cpp */, 17683 41D129CC1F3D0EE300D15E47 /* CacheStorageConnection.h */, 17684 41D129CA1F3D0EE300D15E47 /* CacheStorageRecord.h */, 17670 17685 41FB278E1F34C28200795487 /* DOMWindowCaches.cpp */, 17671 17686 41FB278C1F34C28200795487 /* DOMWindowCaches.h */, … … 19266 19281 460BB6131D0A1BEC00221812 /* Base64Utilities.cpp */, 19267 19282 460BB6141D0A1BEC00221812 /* Base64Utilities.h */, 19283 41D129D41F3D0F6600D15E47 /* CacheStorageProvider.h */, 19268 19284 072CA86016CB4DC3008AE131 /* CaptionUserPreferences.cpp */, 19269 19285 079D0867162F20E800DB8658 /* CaptionUserPreferences.h */, … … 26777 26793 BCB16C280979C3BD00467741 /* CachedXSLStyleSheet.h in Headers */, 26778 26794 93F1995008245E59001E9ABC /* CachePolicy.h in Headers */, 26795 41D129D01F3D0F0500D15E47 /* CacheQueryOptions.h in Headers */, 26779 26796 41380C291F3436AC00155FDA /* CacheStorage.h in Headers */, 26797 41D129D31F3D0F1600D15E47 /* CacheStorageConnection.h in Headers */, 26798 41D129D51F3D0F6900D15E47 /* CacheStorageProvider.h in Headers */, 26799 41D129D21F3D0F1200D15E47 /* CacheStorageRecord.h in Headers */, 26780 26800 E43AF8E71AC5B7EC00CA717E /* CacheValidation.h in Headers */, 26781 26801 49AE2D97134EE5F90072920A /* CalculationValue.h in Headers */, … … 27255 27275 CD9DE18217AAD6A400EA386D /* DOMURLMediaSource.h in Headers */, 27256 27276 1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */, 27277 41D129D11F3D0F0E00D15E47 /* DOMWindowCaches.h in Headers */, 27257 27278 51FA2D78152132B300C1BA0B /* DOMWindowExtension.h in Headers */, 27258 27279 5185FC751BB4C4E80012898F /* DOMWindowIndexedDatabase.h in Headers */, … … 27350 27371 84730D871248F0B300D3A9C9 /* FEOffset.h in Headers */, 27351 27372 84730D891248F0B300D3A9C9 /* FESpecularLighting.h in Headers */, 27373 41D129DB1F3D143800D15E47 /* FetchHeaders.h in Headers */, 27352 27374 416E6FE81BBD12DF000A6023 /* FetchInternalsBuiltins.h in Headers */, 27353 27375 41AD753A1CEF6BD100A31486 /* FetchOptions.h in Headers */, … … 30276 30298 A3E2643114748991005A8588 /* WorkerEventQueue.h in Headers */, 30277 30299 2E4346490F546A8200B0F1BA /* WorkerGlobalScope.h in Headers */, 30300 41D129CE1F3D0EF600D15E47 /* WorkerGlobalScopeCaches.h in Headers */, 30278 30301 5185FCB41BB4C4E80012898F /* WorkerGlobalScopeIndexedDatabase.h in Headers */, 30279 30302 2E43464B0F546A8200B0F1BA /* WorkerGlobalScopeProxy.h in Headers */, … … 30888 30911 BCB16C270979C3BD00467741 /* CachedXSLStyleSheet.cpp in Sources */, 30889 30912 41380C281F3436AC00155FDA /* CacheStorage.cpp in Sources */, 30913 41D129CF1F3D0EFE00D15E47 /* CacheStorageConnection.cpp in Sources */, 30890 30914 E43AF8E61AC5B7E800CA717E /* CacheValidation.cpp in Sources */, 30891 30915 49AE2D96134EE5F90072920A /* CalculationValue.cpp in Sources */, -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r217724 r220758 30 30 #include "InspectorOverlay.h" 31 31 32 #include "CacheStorageProvider.h" 32 33 #include "DocumentLoader.h" 33 34 #include "EditorClient.h" … … 866 867 createEmptyEditorClient(), 867 868 SocketProvider::create(), 868 makeUniqueRef<LibWebRTCProvider>() 869 makeUniqueRef<LibWebRTCProvider>(), 870 CacheStorageProvider::create() 869 871 ); 870 872 fillWithEmptyClients(pageConfiguration); -
trunk/Source/WebCore/page/CacheStorageProvider.h
r220754 r220758 26 26 #pragma once 27 27 28 #include "Supplementable.h" 28 #include "CacheStorageConnection.h" 29 #include "SessionID.h" 30 #include <wtf/RefCounted.h> 29 31 30 32 namespace WebCore { 31 33 32 class CacheStorage; 33 class WorkerGlobalScope; 34 class WEBCORE_EXPORT CacheStorageProvider : public RefCounted<CacheStorageProvider> { 35 public: 36 static Ref<CacheStorageProvider> create() { return adoptRef(*new CacheStorageProvider); } 37 virtual Ref<CacheStorageConnection> createCacheStorageConnection(SessionID) { return CacheStorageConnection::create(); } 38 virtual ~CacheStorageProvider() { }; 34 39 35 class WorkerGlobalScopeCaches : public Supplement<WorkerGlobalScope> { 36 public: 37 WorkerGlobalScopeCaches() = default; 38 39 static CacheStorage* caches(WorkerGlobalScope&); 40 41 private: 42 static WorkerGlobalScopeCaches* from(WorkerGlobalScope&); 43 static const char* supplementName(); 44 CacheStorage* caches() const; 45 46 mutable RefPtr<CacheStorage> m_caches; 40 protected: 41 CacheStorageProvider() = default; 47 42 }; 48 43 49 } // namespace WebCore 50 44 } -
trunk/Source/WebCore/page/Page.cpp
r220730 r220758 27 27 #include "BackForwardController.h" 28 28 #include "CSSAnimationController.h" 29 #include "CacheStorageProvider.h" 29 30 #include "Chrome.h" 30 31 #include "ChromeClient.h" … … 223 224 , m_socketProvider(WTFMove(pageConfiguration.socketProvider)) 224 225 , m_applicationCacheStorage(*WTFMove(pageConfiguration.applicationCacheStorage)) 226 , m_cacheStorageProvider(WTFMove(pageConfiguration.cacheStorageProvider)) 225 227 , m_databaseProvider(*WTFMove(pageConfiguration.databaseProvider)) 226 228 , m_pluginInfoProvider(*WTFMove(pageConfiguration.pluginInfoProvider)) -
trunk/Source/WebCore/page/Page.h
r220730 r220758 78 78 class BackForwardController; 79 79 class BackForwardClient; 80 class CacheStorageProvider; 80 81 class Chrome; 81 82 class ChromeClient; … … 496 497 ApplicationCacheStorage& applicationCacheStorage() { return m_applicationCacheStorage; } 497 498 DatabaseProvider& databaseProvider() { return m_databaseProvider; } 499 CacheStorageProvider& cacheStorageProvider() { return m_cacheStorageProvider; } 498 500 SocketProvider& socketProvider() { return m_socketProvider; } 499 501 … … 766 768 Ref<SocketProvider> m_socketProvider; 767 769 Ref<ApplicationCacheStorage> m_applicationCacheStorage; 770 Ref<CacheStorageProvider> m_cacheStorageProvider; 768 771 Ref<DatabaseProvider> m_databaseProvider; 769 772 Ref<PluginInfoProvider> m_pluginInfoProvider; -
trunk/Source/WebCore/page/PageConfiguration.cpp
r217737 r220758 29 29 #include "ApplicationCacheStorage.h" 30 30 #include "BackForwardClient.h" 31 #include "CacheStorageProvider.h" 31 32 #include "DatabaseProvider.h" 32 33 #include "DiagnosticLoggingClient.h" … … 44 45 namespace WebCore { 45 46 46 PageConfiguration::PageConfiguration(UniqueRef<EditorClient>&& editorClient, Ref<SocketProvider>&& socketProvider, UniqueRef<LibWebRTCProvider>&& libWebRTCProvider )47 PageConfiguration::PageConfiguration(UniqueRef<EditorClient>&& editorClient, Ref<SocketProvider>&& socketProvider, UniqueRef<LibWebRTCProvider>&& libWebRTCProvider, Ref<CacheStorageProvider>&& cacheStorageProvider) 47 48 : editorClient(WTFMove(editorClient)) 48 49 , socketProvider(WTFMove(socketProvider)) 49 50 , libWebRTCProvider(WTFMove(libWebRTCProvider)) 51 , cacheStorageProvider(WTFMove(cacheStorageProvider)) 50 52 { 51 53 } -
trunk/Source/WebCore/page/PageConfiguration.h
r217737 r220758 35 35 class ApplicationCacheStorage; 36 36 class BackForwardClient; 37 class CacheStorageProvider; 37 38 class ChromeClient; 38 39 class ContextMenuClient; … … 59 60 WTF_MAKE_NONCOPYABLE(PageConfiguration); WTF_MAKE_FAST_ALLOCATED; 60 61 public: 61 WEBCORE_EXPORT PageConfiguration(UniqueRef<EditorClient>&&, Ref<SocketProvider>&&, UniqueRef<LibWebRTCProvider>&& );62 WEBCORE_EXPORT PageConfiguration(UniqueRef<EditorClient>&&, Ref<SocketProvider>&&, UniqueRef<LibWebRTCProvider>&&, Ref<CacheStorageProvider>&&); 62 63 WEBCORE_EXPORT ~PageConfiguration(); 63 64 … … 88 89 RefPtr<ApplicationCacheStorage> applicationCacheStorage; 89 90 RefPtr<DatabaseProvider> databaseProvider; 91 Ref<CacheStorageProvider> cacheStorageProvider; 90 92 RefPtr<PluginInfoProvider> pluginInfoProvider; 91 93 RefPtr<StorageNamespaceProvider> storageNamespaceProvider; -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r220503 r220758 29 29 #include "SVGImage.h" 30 30 31 #include "CacheStorageProvider.h" 31 32 #include "Chrome.h" 32 33 #include "CommonVM.h" … … 430 431 createEmptyEditorClient(), 431 432 SocketProvider::create(), 432 makeUniqueRef<LibWebRTCProvider>() 433 makeUniqueRef<LibWebRTCProvider>(), 434 CacheStorageProvider::create() 433 435 ); 434 436 fillWithEmptyClients(pageConfiguration); -
trunk/Source/WebKit/CMakeLists.txt
r220734 r220758 53 53 "${WEBKIT2_DIR}/WebProcess/ApplicationCache" 54 54 "${WEBKIT2_DIR}/WebProcess/Automation" 55 "${WEBKIT2_DIR}/WebProcess/Cache" 55 56 "${WEBKIT2_DIR}/WebProcess/Cookies" 56 57 "${WEBKIT2_DIR}/WebProcess/Databases" -
trunk/Source/WebKit/ChangeLog
r220742 r220758 1 2017-08-15 Youenn Fablet <youenn@apple.com> 2 3 [Cache API] Adding generic support for CacheStorage and Cache methods 4 https://bugs.webkit.org/show_bug.cgi?id=175455 5 6 Reviewed by Chris Dumez. 7 8 * WebKit.xcodeproj/project.pbxproj: 9 * WebProcess/Cache/WebCacheStorageProvider.h: Added. 10 * WebProcess/WebPage/WebPage.cpp: 11 (WebKit::m_cpuLimit): 12 * WebProcess/WebProcess.cpp: 13 (WebKit::WebProcess::WebProcess): 14 * WebProcess/WebProcess.h: 15 (WebKit::WebProcess::cacheStorageProvider): 16 1 17 2017-08-15 Michael Catanzaro <mcatanzaro@igalia.com> 2 18 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r220539 r220758 892 892 413075B31DE85F580039EC69 /* LibWebRTCProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 413075A71DE85EE70039EC69 /* LibWebRTCProvider.cpp */; }; 893 893 413075B41DE85F580039EC69 /* LibWebRTCProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 413075A81DE85EE70039EC69 /* LibWebRTCProvider.h */; }; 894 41D129DA1F3D101800D15E47 /* WebCacheStorageProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D129D91F3D101400D15E47 /* WebCacheStorageProvider.h */; }; 894 895 41DC45961E3D6E2200B11F51 /* NetworkRTCProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 41DC45941E3D6E1E00B11F51 /* NetworkRTCProvider.h */; }; 895 896 41DC45971E3D6E2200B11F51 /* NetworkRTCProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41DC45951E3D6E1E00B11F51 /* NetworkRTCProvider.cpp */; }; … … 3143 3144 413075A81DE85EE70039EC69 /* LibWebRTCProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = LibWebRTCProvider.h; path = Network/webrtc/LibWebRTCProvider.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 3144 3145 41AC86811E042E5300303074 /* WebRTCResolver.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = WebRTCResolver.messages.in; path = Network/webrtc/WebRTCResolver.messages.in; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = "<none>"; }; 3146 41D129D91F3D101400D15E47 /* WebCacheStorageProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebCacheStorageProvider.h; sourceTree = "<group>"; }; 3145 3147 41DC45941E3D6E1E00B11F51 /* NetworkRTCProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkRTCProvider.h; path = NetworkProcess/webrtc/NetworkRTCProvider.h; sourceTree = "<group>"; }; 3146 3148 41DC45951E3D6E1E00B11F51 /* NetworkRTCProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkRTCProvider.cpp; path = NetworkProcess/webrtc/NetworkRTCProvider.cpp; sourceTree = "<group>"; }; … … 5913 5915 sourceTree = "<group>"; 5914 5916 }; 5917 41D129D81F3D101400D15E47 /* Cache */ = { 5918 isa = PBXGroup; 5919 children = ( 5920 41D129D91F3D101400D15E47 /* WebCacheStorageProvider.h */, 5921 ); 5922 path = Cache; 5923 sourceTree = "<group>"; 5924 }; 5915 5925 4450AEBE1DC3FAAC009943F2 /* cocoa */ = { 5916 5926 isa = PBXGroup; … … 6593 6603 1AB1F7701D1B2F5D007C9BD1 /* ApplePay */, 6594 6604 1C0A19431C8FF1A800FE0EBB /* Automation */, 6605 41D129D81F3D101400D15E47 /* Cache */, 6595 6606 7C6E70F818B2D47E00F24E2E /* cocoa */, 6596 6607 3309344B1315B93A0097A7BC /* Cookies */, … … 8690 8701 518D2CAE12D5153B003BB93B /* WebBackForwardListItem.h in Headers */, 8691 8702 BC72B9FB11E6476B001EB4EA /* WebBackForwardListProxy.h in Headers */, 8703 41D129DA1F3D101800D15E47 /* WebCacheStorageProvider.h in Headers */, 8692 8704 BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */, 8693 8705 BC032D7510F4378D0058C15A /* WebChromeClient.h in Headers */, … … 8832 8844 1A1E093418861D3800D2DC49 /* WebProgressTrackerClient.h in Headers */, 8833 8845 512F589D12A8838800629530 /* WebProtectionSpace.h in Headers */, 8834 51BEB62C1F3A5AD7005029B9 /* WebServiceWorkerProvider.h in Headers */,8835 8846 37948404150C350600E52CE9 /* WebRenderLayer.h in Headers */, 8836 8847 3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */, … … 8844 8855 7C361D731927FA360036A59D /* WebScriptMessageHandler.h in Headers */, 8845 8856 D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */, 8857 51BEB62C1F3A5AD7005029B9 /* WebServiceWorkerProvider.h in Headers */, 8846 8858 1A4832D71A9CDF96008B4DFE /* WebsiteData.h in Headers */, 8847 8859 1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */, … … 10372 10384 C0337DD3127A2A0E008FF4F4 /* WebKeyboardEvent.cpp in Sources */, 10373 10385 1A6280F31919982A006AD9F9 /* WebKit.m in Sources */, 10374 51BEB62B1F3A5AD7005029B9 /* WebServiceWorkerProvider.cpp in Sources */,10375 10386 BC9BA5041697C45300E44616 /* WebKit2Initialize.cpp in Sources */, 10376 10387 465250E61ECF52DC002025CB /* WebKit2InitializeCocoa.mm in Sources */, … … 10470 10481 7C361D721927FA360036A59D /* WebScriptMessageHandler.cpp in Sources */, 10471 10482 D3B9484811FF4B6500032B39 /* WebSearchPopupMenu.cpp in Sources */, 10483 51BEB62B1F3A5AD7005029B9 /* WebServiceWorkerProvider.cpp in Sources */, 10472 10484 1A4832D61A9CDF96008B4DFE /* WebsiteData.cpp in Sources */, 10473 10485 1A4832D91A9D1FD2008B4DFE /* WebsiteDataRecord.cpp in Sources */, -
trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageProvider.h
r220754 r220758 26 26 #pragma once 27 27 28 #include "Supplementable.h"28 #include <WebCore/CacheStorageProvider.h> 29 29 30 namespace Web Core{30 namespace WebKit { 31 31 32 class CacheStorage; 33 class WorkerGlobalScope; 34 35 class WorkerGlobalScopeCaches : public Supplement<WorkerGlobalScope> { 32 class WebCacheStorageProvider final : public WebCore::CacheStorageProvider { 36 33 public: 37 WorkerGlobalScopeCaches() = default; 38 39 static CacheStorage* caches(WorkerGlobalScope&); 34 static Ref<WebCacheStorageProvider> create() { return adoptRef(*new WebCacheStorageProvider); } 40 35 41 36 private: 42 static WorkerGlobalScopeCaches* from(WorkerGlobalScope&); 43 static const char* supplementName(); 44 CacheStorage* caches() const; 45 46 mutable RefPtr<CacheStorage> m_caches; 37 WebCacheStorageProvider() = default; 47 38 }; 48 39 49 } // namespace WebCore 50 40 } -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r220734 r220758 69 69 #include "WebBackForwardListItem.h" 70 70 #include "WebBackForwardListProxy.h" 71 #include "WebCacheStorageProvider.h" 71 72 #include "WebChromeClient.h" 72 73 #include "WebColorChooser.h" … … 368 369 makeUniqueRef<WebEditorClient>(this), 369 370 WebSocketProvider::create(), 370 makeUniqueRef<WebKit::LibWebRTCProvider>() 371 makeUniqueRef<WebKit::LibWebRTCProvider>(), 372 WebProcess::singleton().cacheStorageProvider() 371 373 ); 372 374 pageConfiguration.chromeClient = new WebChromeClient(*this); -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r220539 r220758 45 45 #include "UserData.h" 46 46 #include "WebAutomationSessionProxy.h" 47 #include "WebCacheStorageProvider.h" 47 48 #include "WebConnectionToUIProcess.h" 48 49 #include "WebCookieManager.h" … … 161 162 , m_webInspectorInterruptDispatcher(WebInspectorInterruptDispatcher::create()) 162 163 , m_webLoaderStrategy(*new WebLoaderStrategy) 164 , m_cacheStorageProvider(WebCacheStorageProvider::create()) 163 165 , m_dnsPrefetchHystereris([this](HysteresisState state) { if (state == HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); }) 164 166 #if ENABLE(NETSCAPE_PLUGIN_API) -
trunk/Source/WebKit/WebProcess/WebProcess.h
r220412 r220758 81 81 class WaylandCompositorDisplay; 82 82 class WebAutomationSessionProxy; 83 class WebCacheStorageProvider; 83 84 class WebConnectionToUIProcess; 84 85 class WebFrame; … … 222 223 223 224 WebAutomationSessionProxy* automationSessionProxy() { return m_automationSessionProxy.get(); } 225 226 WebCacheStorageProvider& cacheStorageProvider() { return m_cacheStorageProvider.get(); } 224 227 225 228 private: … … 376 379 WebLoaderStrategy& m_webLoaderStrategy; 377 380 381 Ref<WebCacheStorageProvider> m_cacheStorageProvider; 382 378 383 #if USE(LIBWEBRTC) 379 384 std::unique_ptr<LibWebRTCNetwork> m_libWebRTCNetwork; -
trunk/Source/WebKitLegacy/mac/ChangeLog
r220734 r220758 1 2017-08-15 Youenn Fablet <youenn@apple.com> 2 3 [Cache API] Adding generic support for CacheStorage and Cache methods 4 https://bugs.webkit.org/show_bug.cgi?id=175455 5 6 Reviewed by Chris Dumez. 7 8 * WebView/WebView.mm: 9 (-[WebView _commonInitializationWithFrameName:groupName:]): 10 1 11 2017-08-14 Simon Fraser <simon.fraser@apple.com> 2 12 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r220627 r220758 125 125 #import <WebCore/BackForwardController.h> 126 126 #import <WebCore/CSSAnimationController.h> 127 #import <WebCore/CacheStorageProvider.h> 127 128 #import <WebCore/Chrome.h> 128 129 #import <WebCore/ColorMac.h> … … 1414 1415 makeUniqueRef<WebEditorClient>(self), 1415 1416 SocketProvider::create(), 1416 makeUniqueRef<WebCore::LibWebRTCProvider>() 1417 makeUniqueRef<WebCore::LibWebRTCProvider>(), 1418 WebCore::CacheStorageProvider::create() 1417 1419 ); 1418 1420 #if !PLATFORM(IOS) … … 1677 1679 makeUniqueRef<WebEditorClient>(self), 1678 1680 SocketProvider::create(), 1679 makeUniqueRef<WebCore::LibWebRTCProvider>() 1681 makeUniqueRef<WebCore::LibWebRTCProvider>(), 1682 WebCore::CacheStorageProvider::create() 1680 1683 ); 1681 1684 pageConfiguration.chromeClient = new WebChromeClientIOS(self); -
trunk/Source/WebKitLegacy/win/ChangeLog
r220639 r220758 1 2017-08-15 Youenn Fablet <youenn@apple.com> 2 3 [Cache API] Adding generic support for CacheStorage and Cache methods 4 https://bugs.webkit.org/show_bug.cgi?id=175455 5 6 Reviewed by Chris Dumez. 7 8 * WebView.cpp: 9 (WebView::initWithFrame): 10 1 11 2017-08-13 Manuel Rego Casasnovas <rego@igalia.com> 2 12 -
trunk/Source/WebKitLegacy/win/WebView.cpp
r220639 r220758 85 85 #include <WebCore/BackForwardController.h> 86 86 #include <WebCore/BitmapInfo.h> 87 #include <WebCore/CacheStorageProvider.h> 87 88 #include <WebCore/Chrome.h> 88 89 #include <WebCore/ContextMenu.h> … … 3103 3104 makeUniqueRef<WebEditorClient>(this), 3104 3105 SocketProvider::create(), 3105 makeUniqueRef<LibWebRTCProvider>() 3106 makeUniqueRef<LibWebRTCProvider>(), 3107 WebCore::CacheStorageProvider::create() 3106 3108 ); 3107 3109 configuration.backForwardClient = BackForwardList::create();
Note: See TracChangeset
for help on using the changeset viewer.