Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b30931aae73c8bbbff647740c7f66a97376b2e5
https://github.com/WebKit/WebKit/commit/7b30931aae73c8bbbff647740c7f66a97376b2e5
Author: Qianlang Chen <[email protected]>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-source-map-url-expected.txt
A
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-source-map-url.html
A
LayoutTests/http/tests/site-isolation/inspector/network/resources/iframe-with-stylesheet.html
A
LayoutTests/http/tests/site-isolation/inspector/network/resources/stylesheet-with-inline-source-map.css
A
LayoutTests/http/tests/site-isolation/inspector/network/resources/stylesheet-with-source-map-header.py
M Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.cpp
M Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.h
M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp
Log Message:
-----------
Web Inspector: Site Isolation: Network domain sourceMappingURL forwarding
https://bugs.webkit.org/show_bug.cgi?id=310251
rdar://172894304
Reviewed by BJ Burg.
Under Site Isolation, network events for cross-origin iframe
resources are reported by FrameNetworkAgentProxy (WebProcess) to
ProxyingNetworkAgent (UIProcess), bypassing the legacy in-WebProcess
InspectorNetworkAgent (which early-returns from enable() under SI).
FrameNetworkAgentProxy::didFinishLoading was sending an empty
sourceMappingURL, so source maps for stylesheets loaded inside
cross-origin iframes did not auto-link in the Network tab.
Mirror the legacy ResourceUtilities::sourceMapURLForResource
behavior, which is CSS-only by design: script source maps flow
through the Debugger domain (scriptParsed) and are unaffected here.
Because BackendResourceDataStore does not retain the
ResourceResponse, capture the SourceMap (then X-SourceMap) header
when the response is received. At didFinishLoading, for stylesheets,
use that header value, falling back to a "/*# sourceMappingURL=... */"
comment in the decoded stylesheet text, and send the resolved URL in
the LoadingFinished IPC message. ProxyingNetworkAgent::loadingFinished
and the frontend already forward and consume this value, so no
UIProcess or frontend changes are needed.
The memory-cache path (Network.CachedResource.sourceMapURL via
RequestServedFromMemoryCache) is not covered by this change. Tracking
it as a follow-up in webkit.org/b/??????.
Test:
http/tests/site-isolation/inspector/network/cross-origin-iframe-network-source-map-url.html
*
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-source-map-url-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-source-map-url.html:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/network/resources/iframe-with-stylesheet.html:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/network/resources/stylesheet-with-inline-source-map.css:
Added.
(body):
*
LayoutTests/http/tests/site-isolation/inspector/network/resources/stylesheet-with-source-map-header.py:
Added.
* Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.cpp:
(WebKit::BackendResourceDataStore::responseReceived):
* Source/WebKit/WebProcess/Inspector/BackendResourceDataStore.h:
(WebKit::BackendResourceDataStore::ResourceData::setSourceMapURL):
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp:
(WebKit::FrameNetworkAgentProxy::didFinishLoading):
(WebKit::FrameNetworkAgentProxy::didLoadResourceFromMemoryCache):
Canonical link: https://commits.webkit.org/316764@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications