Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ccf6c82ad5c8342f4cc13d3309a622eff66d3133
      
https://github.com/WebKit/WebKit/commit/ccf6c82ad5c8342f4cc13d3309a622eff66d3133
  Author: BJ Burg <[email protected]>
  Date:   2026-05-22 (Fri, 22 May 2026)

  Changed paths:
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-after-navigation-expected.txt
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-after-navigation.html
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-binary-expected.txt
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-binary.html
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-document-expected.txt
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-document.html
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-error-cases-expected.txt
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-error-cases.html
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-expected.txt
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-subresources-expected.txt
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-subresources.html
    A 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body.html
    A 
LayoutTests/http/tests/inspector/network/resources/cross-origin-iframe-with-subresources.html
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/JavaScriptCore/inspector/protocol/Network.json
    M Source/WebCore/inspector/InspectorIdentifierRegistry.cpp
    M Source/WebCore/inspector/InspectorIdentifierRegistry.h
    M Source/WebCore/inspector/InspectorResourceUtilities.h
    M Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
    M Source/WebCore/inspector/agents/InspectorNetworkAgent.h
    M Source/WebKit/Sources.txt
    M Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
    M Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h
    A Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.cpp
    A Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.h
    M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp
    M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.h
    M Source/WebKit/WebProcess/Inspector/WebInspectorBackend.cpp
    M Source/WebKit/WebProcess/Inspector/WebInspectorBackend.h
    M Source/WebKit/WebProcess/Inspector/WebInspectorBackend.messages.in

  Log Message:
  -----------
  [Site Isolation] Web Inspector: add BackendResourceDataStore for response 
body retrieval under Site Isolation
https://bugs.webkit.org/show_bug.cgi?id=308890

Reviewed by Qianlang Chen.

Add BackendResourceDataStore, a WebProcess-side data store that buffers response
metadata and content for Web Inspector under Site Isolation. This enables
Network.getResponseBody to work for resources loaded in cross-origin iframes
that run in separate WebContent processes.

The store is owned by WebInspectorBackend (page-level lifetime) and shared by
all FrameNetworkAgentProxy instances via CheckedRef. Unlike 
NetworkResourcesData,
it does not hold CachedResource references -- all data is copied at
instrumentation time, making the store independent of loader/cache lifecycle.

The getResponseBody command is changed from synchronous to async in the 
protocol,
enabling the UIProcess ProxyingNetworkAgent to send an async IPC to the correct
WebProcess and return the result via callback. Currently, the target WebProcess
is identified by parsing the process-qualified requestId string
(parseDeterministicRequestId). This works but is not ideal -- a future
improvement should maintain a UIProcess-side mapping of handed-out requestIds
to their source process, avoiding the need to reverse-parse frontend-provided
identifiers. FIXME: https://bugs.webkit.org/show_bug.cgi?id=308890

Also fixes pre-existing build errors in InspectorCSSAgent.cpp (missing
PageInspectorController include, HashMap::ensure API change) and adds
WEBCORE_EXPORT to InspectorResourceUtilities functions needed by the WebKit 
layer.

* Source/JavaScriptCore/inspector/protocol/Network.json:
Mark getResponseBody as async.
* Source/WebCore/inspector/InspectorIdentifierRegistry.h:
Add parseDeterministicRequestId() reverse parser. Used by
ProxyingNetworkAgent to route getResponseBody to the correct
WebProcess. See FIXME above for planned improvement.
* Source/WebCore/inspector/InspectorResourceUtilities.h:
Add WEBCORE_EXPORT to shouldTreatAsText, createTextDecoder,
sharedBufferContent, cachedResourceContent. Makes these shared
utilities callable from WebKit-layer agent code.
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
Add missing PageInspectorController.h include.
Replace HashMap::ensure calls with find/set pattern.
* Source/WebCore/inspector/agents/InspectorNetworkAgent.h:
* Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
Convert getResponseBody to async callback pattern.
* Source/WebKit/Sources.txt:
Add BackendResourceDataStore.cpp.
* Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h:
* Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp:
Implement getResponseBody with async IPC to correct WebProcess.
* Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.h: Added.
* Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.cpp: Added.
Response data store with LRU eviction, content buffering, and
getResponseBody lookup. Decoupled from CachedResource lifecycle.
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.h:
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp:
Wire all instrumentation hooks to populate the shared store.
Fix ResourceType FIXME in didReceiveResponse.
* Source/WebKit/WebProcess/Inspector/WebInspectorBackend.h:
* Source/WebKit/WebProcess/Inspector/WebInspectorBackend.cpp:
Own BackendResourceDataStore, add GetResponseBody IPC handler.
* Source/WebKit/WebProcess/Inspector/WebInspectorBackend.messages.in:
Add GetResponseBody async message.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body.html:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-expected.txt:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-binary.html:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-binary-expected.txt:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-document.html:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-document-expected.txt:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-subresources.html:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-subresources-expected.txt:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-after-navigation.html:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-after-navigation-expected.txt:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-error-cases.html:
 Added.
* 
LayoutTests/http/tests/inspector/network/cross-origin-iframe-get-response-body-error-cases-expected.txt:
 Added.
Tests covering text, binary/base64, HTML document, CSS/JS subresources,
post-navigation behavior, and error handling for cross-origin getResponseBody.
* 
LayoutTests/http/tests/inspector/network/resources/cross-origin-iframe-with-subresources.html:
 Added.
Helper page for subresources test.

Canonical link: https://commits.webkit.org/313753@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to