Changeset 281055 in webkit
- Timestamp:
- Aug 13, 2021 7:28:19 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 43 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (2 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Headers.cmake (modified) (1 diff)
-
Source/WebCore/Modules/fetch/FetchLoader.cpp (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Source/WebCore/dom/ScriptExecutionContext.cpp (modified) (1 diff)
-
Source/WebCore/dom/ScriptExecutionContext.h (modified) (2 diffs)
-
Source/WebCore/dom/SecurityContext.cpp (modified) (2 diffs)
-
Source/WebCore/dom/SecurityContext.h (modified) (2 diffs)
-
Source/WebCore/fileapi/Blob.cpp (modified) (2 diffs)
-
Source/WebCore/fileapi/FileReaderLoader.cpp (modified) (1 diff)
-
Source/WebCore/fileapi/ThreadableBlobRegistry.cpp (modified) (2 diffs)
-
Source/WebCore/fileapi/ThreadableBlobRegistry.h (modified) (2 diffs)
-
Source/WebCore/html/HTMLMediaElement.cpp (modified) (1 diff)
-
Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp (modified) (1 diff)
-
Source/WebCore/loader/CrossOriginEmbedderPolicy.h (modified) (2 diffs)
-
Source/WebCore/loader/CrossOriginOpenerPolicy.cpp (modified) (2 diffs)
-
Source/WebCore/loader/FrameLoader.cpp (modified) (1 diff)
-
Source/WebCore/loader/PolicyContainer.h (added)
-
Source/WebCore/platform/network/BlobData.cpp (modified) (1 diff)
-
Source/WebCore/platform/network/BlobData.h (modified) (3 diffs)
-
Source/WebCore/platform/network/BlobRegistry.h (modified) (2 diffs)
-
Source/WebCore/platform/network/BlobRegistryImpl.cpp (modified) (4 diffs)
-
Source/WebCore/platform/network/BlobRegistryImpl.h (modified) (2 diffs)
-
Source/WebCore/platform/network/BlobResourceHandle.cpp (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (modified) (2 diffs)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (modified) (2 diffs)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp (modified) (2 diffs)
-
Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h (modified) (1 diff)
-
Source/WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm (modified) (1 diff)
-
Source/WebKitLegacy/win/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r281054 r281055 1 2021-08-13 Chris Dumez <cdumez@apple.com> 2 3 Add Cross-Origin-Embedder-Policy support for Blob URLs 4 https://bugs.webkit.org/show_bug.cgi?id=229041 5 6 Reviewed by Alex Christensen. 7 8 Update test expectations to unskip tests that are now passing. 9 10 * TestExpectations: 11 1 12 2021-08-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r281010 r281055 402 402 imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html [ DumpJSConsoleLogInStdErr ] 403 403 imported/w3c/web-platform-tests/html/browsers/sandboxing/sandbox-disallow-popups.html [ DumpJSConsoleLogInStdErr ] 404 imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https.html [ DumpJSConsoleLogInStdErr ] 404 405 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/navigate-to-aboutblank.https.html [ DumpJSConsoleLogInStdErr ] 405 406 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html [ DumpJSConsoleLogInStdErr ] … … 722 723 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/no-https.html [ Skip ] 723 724 imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/no-secure-context.html [ Skip ] 724 725 # COEP test timing out due to lack of Blob URL support.726 imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https.html [ Skip ]727 imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https.html [ Skip ]728 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html [ Skip ]729 725 730 726 # This test makes the assumption that get_host_info().REMOTE_ORIGIN is same-site, which is not true for -
trunk/LayoutTests/imported/w3c/ChangeLog
r281025 r281055 1 2021-08-13 Chris Dumez <cdumez@apple.com> 2 3 Add Cross-Origin-Embedder-Policy support for Blob URLs 4 https://bugs.webkit.org/show_bug.cgi?id=229041 5 6 Reviewed by Alex Christensen. 7 8 Rebaseline WPT tests now that more checks are passing. 9 10 * web-platform-tests/html/cross-origin-embedder-policy/blob.https-expected.txt: 11 * web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt: 12 * web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt: 13 1 14 2021-08-13 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https-expected.txt
r280953 r281055 1 CONSOLE MESSAGE: Refused to display 'blob:https://localhost:9443/ce752f78-9f54-4192-885f-d338222dbf89' in a frame because of Cross-Origin-Embedder-Policy.2 CONSOLE MESSAGE: Refused to display 'blob:https://127.0.0.1:9443/2d609484-fc8c-4162-b451-5e5a60ca6fb0' in a frame because of Cross-Origin-Embedder-Policy.3 CONSOLE MESSAGE: Refused to display 'blob:https://127.0.0.1:9443/d6c69b1b-b9e2-468f-afd5-3ee0ca1f26cd' in a frame because of Cross-Origin-Embedder-Policy.4 CONSOLE MESSAGE: Refused to display 'blob:https://localhost:9443/a2f48f74-c115-4535-8945-845540d08260' in a frame because of Cross-Origin-Embedder-Policy.5 CONSOLE MESSAGE: Refused to display 'blob:https://127.0.0.1:9443/e46352d8-4f39-4348-addc-cf3be4c271d5' in a frame because of Cross-Origin-Embedder-Policy.6 CONSOLE MESSAGE: Refused to display 'blob:https://127.0.0.1:9443/d4b68c8b-e74e-47a5-a08d-612bf0d709d7' in a frame because of Cross-Origin-Embedder-Policy.7 1 8 Harness Error ( TIMEOUT), message = null2 Harness Error (FAIL), message = 2 duplicate test names: "Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via subframe", "Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via navigate" 9 3 10 TIMEOUT Cross-Origin-Embedder-Policy and blob: URL from https://localhost:9443 in subframe via subframe Test timed out 11 TIMEOUT Cross-Origin-Embedder-Policy and blob: URL from https://localhost:9443 in subframe via navigate Test timed out 12 TIMEOUT Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via subframe Test timed out 13 TIMEOUT Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via navigate Test timed out 14 TIMEOUT Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via subframe Test timed out 15 TIMEOUT Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via navigate Test timed out 4 PASS Cross-Origin-Embedder-Policy and blob: URL from https://localhost:9443 in subframe via subframe 5 PASS Cross-Origin-Embedder-Policy and blob: URL from https://localhost:9443 in subframe via navigate 6 PASS Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via subframe 7 PASS Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via navigate 8 PASS Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via subframe 9 PASS Cross-Origin-Embedder-Policy and blob: URL from https://127.0.0.1:9443 in subframe via navigate 16 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt
r280953 r281055 1 CONSOLE MESSAGE: Refused to load 'blob:https://localhost:9443/0626116e-3414-4f35-bd1e-007f1312b79e' worker because of Cross-Origin-Embedder-Policy.2 CONSOLE MESSAGE: Worker load was blocked by Cross-Origin-Embedder-Policy3 CONSOLE MESSAGE: Cannot load blob:https://localhost:9443/0626116e-3414-4f35-bd1e-007f1312b79e due to access control checks.4 CONSOLE MESSAGE: Refused to load 'blob:https://localhost:9443/a99eb341-4640-403a-a8f4-c2fcf28ede20' worker because of Cross-Origin-Embedder-Policy.5 CONSOLE MESSAGE: Worker load was blocked by Cross-Origin-Embedder-Policy6 CONSOLE MESSAGE: Cannot load blob:https://localhost:9443/a99eb341-4640-403a-a8f4-c2fcf28ede20 due to access control checks.7 CONSOLE MESSAGE: Refused to load 'blob:https://localhost:9443/929d633e-ce48-43ff-b89d-e4e20fca6753' worker because of Cross-Origin-Embedder-Policy.8 CONSOLE MESSAGE: Worker load was blocked by Cross-Origin-Embedder-Policy9 CONSOLE MESSAGE: Cannot load blob:https://localhost:9443/929d633e-ce48-43ff-b89d-e4e20fca6753 due to access control checks.10 CONSOLE MESSAGE: Refused to load 'blob:https://localhost:9443/0c8b6914-58db-417c-9e0c-e7ecacc4a16a' worker because of Cross-Origin-Embedder-Policy.11 CONSOLE MESSAGE: Worker load was blocked by Cross-Origin-Embedder-Policy12 CONSOLE MESSAGE: Cannot load blob:https://localhost:9443/0c8b6914-58db-417c-9e0c-e7ecacc4a16a due to access control checks.13 14 15 Harness Error (TIMEOUT), message = null16 1 17 2 FAIL frame: origin = https://localhost:9443, value = undefined assert_equals: expected true but got false … … 31 16 PASS dedicated worker: scheme = data, value = self 32 17 PASS dedicated worker: scheme = data, value = (\) 33 TIMEOUT dedicated worker: scheme = blob, value = undefined Test timed out 34 TIMEOUT dedicated worker: scheme = blob, value = * Test timed out 35 TIMEOUT dedicated worker: scheme = blob, value = self Test timed out 36 TIMEOUT dedicated worker: scheme = blob, value = (\) Test timed out 18 FAIL dedicated worker: scheme = blob, value = undefined assert_equals: expected true but got false 19 FAIL dedicated worker: scheme = blob, value = * assert_equals: expected true but got false 20 FAIL dedicated worker: scheme = blob, value = self assert_equals: expected true but got false 21 PASS dedicated worker: scheme = blob, value = (\) 37 22 FAIL shared worker: withCoopCoep = false Can't find variable: SharedWorker 38 23 FAIL shared worker: withCoopCoep = true Can't find variable: SharedWorker -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt
r280504 r281055 1 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header. 2 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html due to access control checks. 3 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header. 4 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html due to access control checks. 5 CONSOLE MESSAGE: Cancelled load to https://127.0.0.1:9443/common/blank.html because it violates the resource's Cross-Origin-Resource-Policy response header. 6 CONSOLE MESSAGE: Fetch API cannot load https://127.0.0.1:9443/common/blank.html due to access control checks. 1 7 2 FAIL COOP+COEP blob URL popup: window.open() assert_true: Cross-origin without CORP did not fail expected true got false 3 FAIL COOP+COEP blob URL popup: <a> assert_true: Cross-origin without CORP did not fail expected true got false 4 FAIL COOP+COEP blob URL popup: <a rel=noopener> assert_true: Cross-origin without CORP did not fail expected true got false 8 PASS COOP+COEP blob URL popup: window.open() 9 PASS COOP+COEP blob URL popup: <a> 10 PASS COOP+COEP blob URL popup: <a rel=noopener> 5 11 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r281010 r281055 374 374 # No Cross-Origin-Embedder-Policy in WK1. 375 375 imported/w3c/web-platform-tests/html/cross-origin-embedder-policy [ Skip ] 376 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html [ Skip ] 376 377 http/wpt/html/cross-origin-embedder-policy/require-corp.https.html [ Skip ] 377 378 -
trunk/LayoutTests/platform/win/TestExpectations
r281038 r281055 3728 3728 # No Cross-Origin-Embedder-Policy in WK1. 3729 3729 imported/w3c/web-platform-tests/html/cross-origin-embedder-policy [ Skip ] 3730 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html [ Skip ] 3730 3731 http/wpt/html/cross-origin-embedder-policy/require-corp.https.html [ Skip ] 3731 3732 -
trunk/Source/WebCore/ChangeLog
r281048 r281055 1 2021-08-13 Chris Dumez <cdumez@apple.com> 2 3 Add Cross-Origin-Embedder-Policy support for Blob URLs 4 https://bugs.webkit.org/show_bug.cgi?id=229041 5 6 Reviewed by Alex Christensen. 7 8 Add Cross-Origin-Embedder-Policy (COEP) support for Blob URLs. We do the same thing as for COOP, 9 we pass the COEP policy when registering the Blob URL and store it in the BlobData. When we need 10 the construct a Blob resource response as a result of a load, we add the right COEP headers 11 based on the BlobData's COEP policy. 12 13 No new tests, rebaselined existing tests. 14 15 * Modules/fetch/FetchLoader.cpp: 16 (WebCore::FetchLoader::startLoadingBlobURL): 17 * fileapi/Blob.cpp: 18 (WebCore::BlobURLRegistry::registerURL): 19 (WebCore::Blob::Blob): 20 * fileapi/FileReaderLoader.cpp: 21 (WebCore::FileReaderLoader::start): 22 * fileapi/ThreadableBlobRegistry.cpp: 23 (WebCore::ThreadableBlobRegistry::registerBlobURL): 24 * fileapi/ThreadableBlobRegistry.h: 25 * html/HTMLMediaElement.cpp: 26 (WebCore::HTMLMediaElement::loadResource): 27 * loader/CrossOriginEmbedderPolicy.cpp: 28 (WebCore::addCrossOriginEmbedderPolicyHeaders): 29 * loader/CrossOriginEmbedderPolicy.h: 30 (WebCore::operator==): 31 * loader/CrossOriginOpenerPolicy.cpp: 32 (WebCore::addCrossOriginOpenerPolicyHeaders): 33 * loader/FrameLoader.cpp: 34 (WebCore::FrameLoader::didBeginDocument): 35 * platform/network/BlobData.h: 36 (WebCore::BlobData::crossOriginEmbedderPolicy const): 37 (WebCore::BlobData::setCrossOriginEmbedderPolicy): 38 * platform/network/BlobRegistry.h: 39 * platform/network/BlobRegistryImpl.cpp: 40 (WebCore::BlobRegistryImpl::registerBlobURL): 41 (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked): 42 * platform/network/BlobRegistryImpl.h: 43 * platform/network/BlobResourceHandle.cpp: 44 (WebCore::BlobResourceHandle::notifyResponseOnSuccess): 45 1 46 2021-08-13 Brent Fulgham <bfulgham@apple.com> 2 47 -
trunk/Source/WebCore/Headers.cmake
r280824 r281055 810 810 loader/PingLoader.h 811 811 loader/PolicyChecker.h 812 loader/PolicyContainer.h 812 813 loader/PrivateClickMeasurement.h 813 814 loader/ProgressTracker.h -
trunk/Source/WebCore/Modules/fetch/FetchLoader.cpp
r280881 r281055 66 66 } 67 67 68 ThreadableBlobRegistry::registerBlobURL(context.securityOrigin(), context. crossOriginOpenerPolicy(), m_urlForReading, blobURL);68 ThreadableBlobRegistry::registerBlobURL(context.securityOrigin(), context.policyContainer(), m_urlForReading, blobURL); 69 69 70 70 ResourceRequest request(m_urlForReading); -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r280968 r281055 1280 1280 466172EC23A2AC1F003AB309 /* PostMessageOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 466172EB23A2ABFA003AB309 /* PostMessageOptions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1281 1281 46658DC91FA24B8700F7DD54 /* SWContextManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4672413B1FA24B140088BD6D /* SWContextManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1282 466C2DAD26C73AFC00651931 /* PolicyContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 466C2DAB26C73AFB00651931 /* PolicyContainer.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1282 1283 466ED8D31EDE0144005E43F6 /* JSDOMRectList.h in Headers */ = {isa = PBXBuildFile; fileRef = 466ED8D21EDE0135005E43F6 /* JSDOMRectList.h */; }; 1283 1284 4671E0661D67A59600C6B497 /* CanvasPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 4671E0641D67A57B00C6B497 /* CanvasPath.h */; }; … … 8281 8282 466172EB23A2ABFA003AB309 /* PostMessageOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostMessageOptions.h; sourceTree = "<group>"; }; 8282 8283 466536FA264C8DD100AAD1D7 /* JSAudioNodeCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioNodeCustom.cpp; sourceTree = "<group>"; }; 8284 466C2DAB26C73AFB00651931 /* PolicyContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyContainer.h; sourceTree = "<group>"; }; 8283 8285 466DC6AB1EDE021D00746224 /* JSDOMRectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMRectList.cpp; sourceTree = "<group>"; }; 8284 8286 466ED8D21EDE0135005E43F6 /* JSDOMRectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMRectList.h; sourceTree = "<group>"; }; … … 27359 27361 97059975107D975200A50A7C /* PolicyChecker.cpp */, 27360 27362 97059976107D975200A50A7C /* PolicyChecker.h */, 27363 466C2DAB26C73AFB00651931 /* PolicyContainer.h */, 27361 27364 6B0A07F121FA4B5C00D57391 /* PrivateClickMeasurement.cpp */, 27362 27365 6B0A07F021FA4B5C00D57391 /* PrivateClickMeasurement.h */, … … 33991 33994 84730D921248F0B300D3A9C9 /* PointLightSource.h in Headers */, 33992 33995 9705997A107D975200A50A7C /* PolicyChecker.h in Headers */, 33996 466C2DAD26C73AFC00651931 /* PolicyContainer.h in Headers */, 33993 33997 FD45A957175D414C00C21EC8 /* PolygonShape.h in Headers */, 33994 33998 5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */, -
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
r280881 r281055 337 337 } 338 338 339 const CrossOriginOpenerPolicy& ScriptExecutionContext::crossOriginOpenerPolicy() const340 {341 static NeverDestroyed<CrossOriginOpenerPolicy> coop;342 return coop;343 }344 345 339 void ScriptExecutionContext::suspendActiveDOMObjectIfNeeded(ActiveDOMObject& activeDOMObject) 346 340 { -
trunk/Source/WebCore/dom/ScriptExecutionContext.h
r280881 r281055 79 79 enum class TaskSource : uint8_t; 80 80 81 struct CrossOriginOpenerPolicy;82 83 81 #if ENABLE(SERVICE_WORKER) 84 82 class ServiceWorker; … … 148 146 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSuspended; } 149 147 bool activeDOMObjectsAreStopped() const { return m_activeDOMObjectsAreStopped; } 150 151 virtual const CrossOriginOpenerPolicy& crossOriginOpenerPolicy() const;152 148 153 149 JSC::ScriptExecutionStatus jscScriptExecutionStatus() const; -
trunk/Source/WebCore/dom/SecurityContext.cpp
r280504 r281055 30 30 #include "ContentSecurityPolicy.h" 31 31 #include "HTMLParserIdioms.h" 32 #include "PolicyContainer.h" 32 33 #include "SecurityOrigin.h" 33 34 #include "SecurityOriginPolicy.h" … … 160 161 } 161 162 163 const CrossOriginOpenerPolicy& SecurityContext::crossOriginOpenerPolicy() const 164 { 165 static NeverDestroyed<CrossOriginOpenerPolicy> coop; 166 return coop; 162 167 } 168 169 PolicyContainer SecurityContext::policyContainer() const 170 { 171 return { 172 crossOriginEmbedderPolicy(), 173 crossOriginOpenerPolicy() 174 }; 175 } 176 177 } -
trunk/Source/WebCore/dom/SecurityContext.h
r280953 r281055 39 39 class SecurityOriginPolicy; 40 40 class ContentSecurityPolicy; 41 struct CrossOriginOpenerPolicy; 42 struct PolicyContainer; 41 43 42 44 enum SandboxFlag { … … 91 93 const CrossOriginEmbedderPolicy& crossOriginEmbedderPolicy() const { return m_crossOriginEmbedderPolicy; } 92 94 void setCrossOriginEmbedderPolicy(const CrossOriginEmbedderPolicy& crossOriginEmbedderPolicy) { m_crossOriginEmbedderPolicy = crossOriginEmbedderPolicy; } 95 96 virtual const CrossOriginOpenerPolicy& crossOriginOpenerPolicy() const; 97 98 PolicyContainer policyContainer() const; 93 99 94 100 WEBCORE_EXPORT SecurityOrigin* securityOrigin() const; -
trunk/Source/WebCore/fileapi/Blob.cpp
r280881 r281055 38 38 #include "File.h" 39 39 #include "JSDOMPromiseDeferred.h" 40 #include "PolicyContainer.h" 40 41 #include "ReadableStream.h" 41 42 #include "ReadableStreamSource.h" … … 63 64 { 64 65 ASSERT(&blob.registry() == this); 65 ThreadableBlobRegistry::registerBlobURL(context.securityOrigin(), context. crossOriginOpenerPolicy(), publicURL, static_cast<Blob&>(blob).url());66 ThreadableBlobRegistry::registerBlobURL(context.securityOrigin(), context.policyContainer(), publicURL, static_cast<Blob&>(blob).url()); 66 67 } 67 68 -
trunk/Source/WebCore/fileapi/FileReaderLoader.cpp
r280881 r281055 83 83 return; 84 84 } 85 ThreadableBlobRegistry::registerBlobURL(scriptExecutionContext->securityOrigin(), scriptExecutionContext-> crossOriginOpenerPolicy(), m_urlForReading, blob.url());85 ThreadableBlobRegistry::registerBlobURL(scriptExecutionContext->securityOrigin(), scriptExecutionContext->policyContainer(), m_urlForReading, blob.url()); 86 86 87 87 // Construct and load the request. -
trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp
r280890 r281055 101 101 } 102 102 103 void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin* origin, const CrossOriginOpenerPolicy& coop, const URL& url, const URL& srcURL)103 void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin* origin, const PolicyContainer& policyContainer, const URL& url, const URL& srcURL) 104 104 { 105 105 // If the blob URL contains null origin, as in the context with unique security origin or file URL, save the mapping between url and origin so that the origin can be retrived when doing security origin check. … … 108 108 109 109 if (isMainThread()) { 110 blobRegistry().registerBlobURL(url, srcURL, coop);110 blobRegistry().registerBlobURL(url, srcURL, policyContainer); 111 111 return; 112 112 } 113 113 114 callOnMainThread([url = url.isolatedCopy(), srcURL = srcURL.isolatedCopy(), coop = crossThreadCopy(coop)] {115 blobRegistry().registerBlobURL(url, srcURL, coop);114 callOnMainThread([url = url.isolatedCopy(), srcURL = srcURL.isolatedCopy(), policyContainer = crossThreadCopy(policyContainer)] { 115 blobRegistry().registerBlobURL(url, srcURL, policyContainer); 116 116 }); 117 117 } -
trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h
r280881 r281055 39 39 class SecurityOrigin; 40 40 41 struct CrossOriginOpenerPolicy;41 struct PolicyContainer; 42 42 43 43 class ThreadableBlobRegistry { … … 45 45 static void registerFileBlobURL(const URL&, const String& path, const String& replacementPath, const String& contentType); 46 46 static void registerBlobURL(const URL&, Vector<BlobPart>&& blobParts, const String& contentType); 47 static void registerBlobURL(SecurityOrigin*, const CrossOriginOpenerPolicy&, const URL&, const URL& srcURL);47 static void registerBlobURL(SecurityOrigin*, const PolicyContainer&, const URL&, const URL& srcURL); 48 48 static void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, const String& fileBackedPath, const String& contentType); 49 49 static void registerBlobURLForSlice(const URL& newURL, const URL& srcURL, long long start, long long end, const String& contentType); -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r280920 r281055 1553 1553 ThreadableBlobRegistry::unregisterBlobURL(m_blobURLForReading); 1554 1554 m_blobURLForReading = BlobURL::createPublicURL(&document().securityOrigin()); 1555 ThreadableBlobRegistry::registerBlobURL(&document().securityOrigin(), document(). crossOriginOpenerPolicy(), m_blobURLForReading, m_blob->url());1555 ThreadableBlobRegistry::registerBlobURL(&document().securityOrigin(), document().policyContainer(), m_blobURLForReading, m_blob->url()); 1556 1556 1557 1557 if (!m_player->load(m_blobURLForReading, contentType, keySystem)) -
trunk/Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp
r280953 r281055 75 75 } 76 76 77 void addCrossOriginEmbedderPolicyHeaders(ResourceResponse& response, const CrossOriginEmbedderPolicy& coep) 78 { 79 if (coep.value != CrossOriginEmbedderPolicyValue::UnsafeNone) { 80 ASSERT(coep.value == CrossOriginEmbedderPolicyValue::RequireCORP); 81 if (coep.reportingEndpoint.isEmpty()) 82 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginEmbedderPolicy, "require-corp"_s); 83 else 84 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginEmbedderPolicy, makeString("require-corp; report-to=\"", coep.reportingEndpoint, '\"')); 85 } 86 if (coep.reportOnlyValue != CrossOriginEmbedderPolicyValue::UnsafeNone) { 87 ASSERT(coep.reportOnlyValue == CrossOriginEmbedderPolicyValue::RequireCORP); 88 if (coep.reportOnlyReportingEndpoint.isEmpty()) 89 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginEmbedderPolicyReportOnly, "require-corp"_s); 90 else 91 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginEmbedderPolicyReportOnly, makeString("require-corp; report-to=\"", coep.reportOnlyReportingEndpoint, '\"')); 92 } 93 } 94 77 95 } // namespace WebCore -
trunk/Source/WebCore/loader/CrossOriginEmbedderPolicy.h
r280953 r281055 51 51 }; 52 52 53 inline bool operator==(const CrossOriginEmbedderPolicy& a, const CrossOriginEmbedderPolicy& b) 54 { 55 return a.value == b.value && a.reportingEndpoint == b.reportingEndpoint && a.reportOnlyValue == b.reportOnlyValue && a.reportOnlyReportingEndpoint == b.reportOnlyReportingEndpoint; 56 } 57 53 58 template<class Encoder> 54 59 void CrossOriginEmbedderPolicy::encode(Encoder& encoder) const … … 89 94 90 95 CrossOriginEmbedderPolicy obtainCrossOriginEmbedderPolicy(const ResourceResponse&, const ScriptExecutionContext&); 96 WEBCORE_EXPORT void addCrossOriginEmbedderPolicyHeaders(ResourceResponse&, const CrossOriginEmbedderPolicy&); 91 97 92 98 enum class IsSecureContext : bool { No, Yes }; -
trunk/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp
r280953 r281055 104 104 else 105 105 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginOpenerPolicy, makeString(crossOriginOpenerPolicyToString(coop.value), "; report-to=\"", coop.reportingEndpoint, '\"')); 106 if (coop.value == CrossOriginOpenerPolicyValue::SameOriginPlusCOEP)107 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginEmbedderPolicy, "require-corp"_s); // FIXME: Pass in coep and set header value correctly.108 106 } 109 107 if (coop.reportOnlyValue != CrossOriginOpenerPolicyValue::UnsafeNone) { … … 112 110 else 113 111 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginOpenerPolicyReportOnly, makeString(crossOriginOpenerPolicyToString(coop.reportOnlyValue), "; report-to=\"", coop.reportOnlyReportingEndpoint, '\"')); 114 if (coop.reportOnlyValue == CrossOriginOpenerPolicyValue::SameOriginPlusCOEP)115 response.setHTTPHeaderField(HTTPHeaderName::CrossOriginEmbedderPolicyReportOnly, "require-corp"_s); // FIXME: Pass in coep and set header value correctly.116 112 } 117 113 } -
trunk/Source/WebCore/loader/FrameLoader.cpp
r280953 r281055 752 752 m_frame.document()->contentSecurityPolicy()->didReceiveHeaders(ContentSecurityPolicyResponseHeaders(m_documentLoader->response()), referrer(), ContentSecurityPolicy::ReportParsingErrors::No); 753 753 754 if (m_frame.document()->url().protocolIsInHTTPFamily() )754 if (m_frame.document()->url().protocolIsInHTTPFamily() || m_frame.document()->url().protocolIsBlob()) 755 755 m_frame.document()->setCrossOriginEmbedderPolicy(obtainCrossOriginEmbedderPolicy(m_documentLoader->response(), *m_frame.document())); 756 756 -
trunk/Source/WebCore/platform/network/BlobData.cpp
r280881 r281055 82 82 { 83 83 auto blobData = BlobData::create(m_contentType); 84 blobData->m_ coop = m_coop;84 blobData->m_policyContainer = m_policyContainer; 85 85 blobData->m_items = m_items; 86 86 return blobData; -
trunk/Source/WebCore/platform/network/BlobData.h
r280881 r281055 33 33 34 34 #include "BlobDataFileReference.h" 35 #include " CrossOriginOpenerPolicy.h"35 #include "PolicyContainer.h" 36 36 #include "ThreadSafeDataBuffer.h" 37 37 #include <wtf/Forward.h> … … 107 107 const String& contentType() const { return m_contentType; } 108 108 109 const CrossOriginOpenerPolicy& crossOriginOpenerPolicy() const { return m_coop; }110 void set CrossOriginOpenerPolicy(const CrossOriginOpenerPolicy& coop) { m_coop = coop; }109 const PolicyContainer& policyContainer() const { return m_policyContainer; } 110 void setPolicyContainer(const PolicyContainer& policyContainer) { m_policyContainer = policyContainer; } 111 111 112 112 const BlobDataItemList& items() const { return m_items; } … … 126 126 127 127 String m_contentType; 128 CrossOriginOpenerPolicy m_coop;128 PolicyContainer m_policyContainer; 129 129 BlobDataItemList m_items; 130 130 }; -
trunk/Source/WebCore/platform/network/BlobRegistry.h
r280881 r281055 42 42 class BlobRegistryImpl; 43 43 44 struct CrossOriginOpenerPolicy;44 struct PolicyContainer; 45 45 46 46 WEBCORE_EXPORT BlobRegistry& blobRegistry(); … … 57 57 58 58 // Registers a new blob URL referring to the blob data identified by the specified srcURL. 59 virtual void registerBlobURL(const URL&, const URL& srcURL, const CrossOriginOpenerPolicy&) = 0;59 virtual void registerBlobURL(const URL&, const URL& srcURL, const PolicyContainer&) = 0; 60 60 61 61 // Registers a new blob URL referring to the blob data identified by the specified srcURL or, if none found, referring to the file found at the given path. -
trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp
r280881 r281055 36 36 #include "BlobPart.h" 37 37 #include "BlobResourceHandle.h" 38 #include "PolicyContainer.h" 38 39 #include "ResourceError.h" 39 40 #include "ResourceHandle.h" … … 153 154 } 154 155 155 void BlobRegistryImpl::registerBlobURL(const URL& url, const URL& srcURL, const CrossOriginOpenerPolicy& coop)156 { 157 registerBlobURLOptionallyFileBacked(url, srcURL, nullptr, { }, coop);158 } 159 160 void BlobRegistryImpl::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& file, const String& contentType, const CrossOriginOpenerPolicy& coop)156 void BlobRegistryImpl::registerBlobURL(const URL& url, const URL& srcURL, const PolicyContainer& policyContainer) 157 { 158 registerBlobURLOptionallyFileBacked(url, srcURL, nullptr, { }, policyContainer); 159 } 160 161 void BlobRegistryImpl::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& file, const String& contentType, const PolicyContainer& policyContainer) 161 162 { 162 163 ASSERT(isMainThread()); … … 165 166 BlobData* src = getBlobDataFromURL(srcURL); 166 167 if (src) { 167 if (src-> crossOriginOpenerPolicy() == coop)168 if (src->policyContainer() == policyContainer) 168 169 addBlobData(url.string(), src); 169 170 else { 170 171 auto clone = src->clone(); 171 clone->set CrossOriginOpenerPolicy(coop);172 clone->setPolicyContainer(policyContainer); 172 173 addBlobData(url.string(), WTFMove(clone)); 173 174 } … … 180 181 auto backingFile = BlobData::create(contentType); 181 182 backingFile->appendFile(file.releaseNonNull()); 182 backingFile->set CrossOriginOpenerPolicy(coop);183 backingFile->setPolicyContainer(policyContainer); 183 184 184 185 addBlobData(url.string(), WTFMove(backingFile)); -
trunk/Source/WebCore/platform/network/BlobRegistryImpl.h
r280881 r281055 46 46 class ResourceRequest; 47 47 class ThreadSafeDataBuffer; 48 struct CrossOriginOpenerPolicy;48 struct PolicyContainer; 49 49 50 50 // BlobRegistryImpl is not thread-safe. It should only be called from main thread. … … 63 63 void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType); 64 64 void registerBlobURL(const URL&, Vector<BlobPart>&&, const String& contentType); 65 void registerBlobURL(const URL&, const URL& srcURL, const CrossOriginOpenerPolicy&);66 void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType, const CrossOriginOpenerPolicy&);65 void registerBlobURL(const URL&, const URL& srcURL, const PolicyContainer&); 66 void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType, const PolicyContainer&); 67 67 void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end, const String& contentType); 68 68 void unregisterBlobURL(const URL&); -
trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp
r280881 r281055 35 35 #include "AsyncFileStream.h" 36 36 #include "BlobData.h" 37 #include "CrossOriginOpenerPolicy.h"38 37 #include "FileStream.h" 39 38 #include "HTTPHeaderNames.h" … … 578 577 response.setHTTPHeaderField(HTTPHeaderName::ContentType, m_blobData->contentType()); 579 578 response.setHTTPHeaderField(HTTPHeaderName::ContentLength, String::number(m_totalRemainingSize)); 580 addCrossOriginOpenerPolicyHeaders(response, m_blobData->crossOriginOpenerPolicy()); 579 addCrossOriginOpenerPolicyHeaders(response, m_blobData->policyContainer().crossOriginOpenerPolicy); 580 addCrossOriginEmbedderPolicyHeaders(response, m_blobData->policyContainer().crossOriginEmbedderPolicy); 581 581 582 582 if (isRangeRequest) -
trunk/Source/WebKit/ChangeLog
r281054 r281055 1 2021-08-13 Chris Dumez <cdumez@apple.com> 2 3 Add Cross-Origin-Embedder-Policy support for Blob URLs 4 https://bugs.webkit.org/show_bug.cgi?id=229041 5 6 Reviewed by Alex Christensen. 7 8 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 9 (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL): 10 (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked): 11 * NetworkProcess/NetworkConnectionToWebProcess.h: 12 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 13 * NetworkProcess/NetworkDataTaskBlob.cpp: 14 (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): 15 * NetworkProcess/NetworkProcessPlatformStrategies.cpp: 16 (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): 17 * WebProcess/FileAPI/BlobRegistryProxy.cpp: 18 (WebKit::BlobRegistryProxy::registerBlobURL): 19 * WebProcess/FileAPI/BlobRegistryProxy.h: 20 1 21 2021-08-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 22 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r280881 r281055 829 829 } 830 830 831 void NetworkConnectionToWebProcess::registerBlobURLFromURL(const URL& url, const URL& srcURL, CrossOriginOpenerPolicy&& coop)831 void NetworkConnectionToWebProcess::registerBlobURLFromURL(const URL& url, const URL& srcURL, PolicyContainer&& policyContainer) 832 832 { 833 833 auto* session = networkSession(); … … 835 835 return; 836 836 837 session->blobRegistry().registerBlobURL(url, srcURL, WTFMove( coop));837 session->blobRegistry().registerBlobURL(url, srcURL, WTFMove(policyContainer)); 838 838 } 839 839 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r280881 r281055 67 67 enum class StorageAccessScope : bool; 68 68 enum class ShouldAskITP : bool; 69 struct CrossOriginOpenerPolicy;69 struct PolicyContainer; 70 70 struct RequestStorageAccessResult; 71 71 struct SameSiteInfo; … … 231 231 void registerFileBlobURL(const URL&, const String& path, const String& replacementPath, SandboxExtension::Handle&&, const String& contentType); 232 232 void registerBlobURL(const URL&, Vector<WebCore::BlobPart>&&, const String& contentType); 233 void registerBlobURLFromURL(const URL&, const URL& srcURL, WebCore:: CrossOriginOpenerPolicy&&);233 void registerBlobURLFromURL(const URL&, const URL& srcURL, WebCore::PolicyContainer&&); 234 234 void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, const String& fileBackedPath, const String& contentType); 235 235 void registerBlobURLForSlice(const URL&, const URL& srcURL, int64_t start, int64_t end, const String& contentType); -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r280881 r281055 51 51 RegisterFileBlobURL(URL url, String path, String replacementPath, WebKit::SandboxExtension::Handle extensionHandle, String contentType) 52 52 RegisterBlobURL(URL url, Vector<WebCore::BlobPart> blobParts, String contentType) 53 RegisterBlobURLFromURL(URL url, URL srcURL, struct WebCore:: CrossOriginOpenerPolicy coop)53 RegisterBlobURLFromURL(URL url, URL srcURL, struct WebCore::PolicyContainer policyContainer) 54 54 RegisterBlobURLOptionallyFileBacked(URL url, URL srcURL, String fileBackedPath, String contentType) 55 55 RegisterBlobURLForSlice(URL url, URL srcURL, int64_t start, int64_t end, String contentType) -
trunk/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp
r280881 r281055 42 42 #include <WebCore/AsyncFileStream.h> 43 43 #include <WebCore/BlobRegistryImpl.h> 44 #include <WebCore/CrossOriginEmbedderPolicy.h> 44 45 #include <WebCore/CrossOriginOpenerPolicy.h> 45 46 #include <WebCore/HTTPParsers.h> … … 266 267 response.setHTTPHeaderField(HTTPHeaderName::ContentType, m_blobData->contentType()); 267 268 response.setHTTPHeaderField(HTTPHeaderName::ContentLength, String::number(m_totalRemainingSize)); 268 addCrossOriginOpenerPolicyHeaders(response, m_blobData->crossOriginOpenerPolicy()); 269 addCrossOriginOpenerPolicyHeaders(response, m_blobData->policyContainer().crossOriginOpenerPolicy); 270 addCrossOriginEmbedderPolicyHeaders(response, m_blobData->policyContainer().crossOriginEmbedderPolicy); 269 271 270 272 if (isRangeRequest) -
trunk/Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp
r280881 r281055 60 60 void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& path, const String& contentType) final { ASSERT_NOT_REACHED(); } 61 61 void registerBlobURL(const URL&, Vector<BlobPart>&&, const String& contentType) final { ASSERT_NOT_REACHED(); } 62 void registerBlobURL(const URL&, const URL& srcURL, const WebCore::CrossOriginOpenerPolicy&) final { ASSERT_NOT_REACHED(); }62 void registerBlobURL(const URL&, const URL& srcURL, const PolicyContainer&) final { ASSERT_NOT_REACHED(); } 63 63 void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); } 64 64 void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end, const String& contentType) final { ASSERT_NOT_REACHED(); } -
trunk/Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp
r281032 r281055 57 57 } 58 58 59 void BlobRegistryProxy::registerBlobURL(const URL& url, const URL& srcURL, const CrossOriginOpenerPolicy& coop)59 void BlobRegistryProxy::registerBlobURL(const URL& url, const URL& srcURL, const PolicyContainer& policyContainer) 60 60 { 61 WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL { url, srcURL, coop}, 0);61 WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL { url, srcURL, policyContainer }, 0); 62 62 } 63 63 -
trunk/Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h
r280881 r281055 34 34 void registerFileBlobURL(const URL&, Ref<WebCore::BlobDataFileReference>&&, const String& path, const String& contentType) final; 35 35 void registerBlobURL(const URL&, Vector<WebCore::BlobPart>&&, const String& contentType) final; 36 void registerBlobURL(const URL&, const URL& srcURL, const WebCore:: CrossOriginOpenerPolicy&) final;36 void registerBlobURL(const URL&, const URL& srcURL, const WebCore::PolicyContainer&) final; 37 37 void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&&, const String& contentType) final; 38 38 void unregisterBlobURL(const URL&) final; -
trunk/Source/WebKitLegacy/mac/ChangeLog
r280999 r281055 1 2021-08-13 Chris Dumez <cdumez@apple.com> 2 3 Add Cross-Origin-Embedder-Policy support for Blob URLs 4 https://bugs.webkit.org/show_bug.cgi?id=229041 5 6 Reviewed by Alex Christensen. 7 8 * WebCoreSupport/WebPlatformStrategies.mm: 9 1 10 2021-08-12 Chris Dumez <cdumez@apple.com> 2 11 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm
r280881 r281055 86 86 void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String&, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); } 87 87 void registerBlobURL(const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); } 88 void registerBlobURL(const URL& url, const URL& srcURL, const CrossOriginOpenerPolicy& coop) final { m_blobRegistry.registerBlobURL(url, srcURL, coop); }88 void registerBlobURL(const URL& url, const URL& srcURL, const PolicyContainer& policyContainer) final { m_blobRegistry.registerBlobURL(url, srcURL, policyContainer); } 89 89 void registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(reference), contentType, { }); } 90 90 void registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end, const String& contentType) final { m_blobRegistry.registerBlobURLForSlice(url, srcURL, start, end, contentType); } -
trunk/Source/WebKitLegacy/win/ChangeLog
r280881 r281055 1 2021-08-13 Chris Dumez <cdumez@apple.com> 2 3 Add Cross-Origin-Embedder-Policy support for Blob URLs 4 https://bugs.webkit.org/show_bug.cgi?id=229041 5 6 Reviewed by Alex Christensen. 7 8 * WebCoreSupport/WebPlatformStrategies.cpp: 9 1 10 2021-08-10 Chris Dumez <cdumez@apple.com> 2 11 -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
r280881 r281055 82 82 void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String&, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); } 83 83 void registerBlobURL(const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); } 84 void registerBlobURL(const URL& url, const URL& srcURL, const CrossOriginOpenerPolicy& coop) final { m_blobRegistry.registerBlobURL(url, srcURL, coop); }84 void registerBlobURL(const URL& url, const URL& srcURL, const PolicyContainer& policyContainer) final { m_blobRegistry.registerBlobURL(url, srcURL, policyContainer); } 85 85 void registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(reference), contentType, { }); } 86 86 void registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end, const String& contentType) final { m_blobRegistry.registerBlobURLForSlice(url, srcURL, start, end, contentType); }
Note: See TracChangeset
for help on using the changeset viewer.