Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ff5b2cf4386431d725cf5ad25a10442e21f3022
      
https://github.com/WebKit/WebKit/commit/5ff5b2cf4386431d725cf5ad25a10442e21f3022
  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-memory-cache-source-map-url-expected.txt
    A 
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-memory-cache-source-map-url.html
    A 
LayoutTests/http/tests/site-isolation/inspector/network/resources/stylesheet-with-source-map-header-cacheable.py
    M Source/WebCore/inspector/InspectorResourceUtilities.h
    M Source/WebCore/loader/cache/CachedResource.h
    M Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
    M Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h
    M Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.messages.in
    M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp

  Log Message:
  -----------
  [Site Isolation] Web Inspector: Network domain sourceMappingURL is not 
forwarded for memory-cached cross-origin iframe stylesheets
https://bugs.webkit.org/show_bug.cgi?id=318740

Reviewed by BJ Burg.

Follow-up to the cold-load sourceMappingURL work, 
https://github.com/WebKit/WebKit/pull/68571.
Under Site Isolation, network events for cross-origin iframe resources
are reported by FrameNetworkAgentProxy (WebProcess) to ProxyingNetworkAgent
(UIProcess). A resource served from WebCore's in-memory cache does not
go through the willSendRequest/didReceiveResponse/didFinishLoading
sequence; instead FrameNetworkAgentProxy::didLoadResourceFromMemoryCache
fires once. That path previously synthesized requestWillBeSent +
responseReceived and forwarded no sourceMappingURL, so source maps for
stylesheets served from the memory cache did not auto-link in the
Network tab (they linked on the cold load but stopped once cached).

Finish the memory-cache path so it mirrors the legacy Network agent
instead of the synthesized requestWillBeSent + responseReceived it
emitted before. didLoadResourceFromMemoryCache has the CachedResource
in hand, so the CSS sourceMappingURL is resolved there (CSS-only by
design; scripts flow through the Debugger domain) and threaded through
to ProxyingNetworkAgent, which now dispatches the real
Network.requestServedFromMemoryCache event. The frontend already
consumes that event's sourceMapURL, so no frontend changes are needed;
emitting the real event (rather than the synthesized pair) also gives
memory-cached cross-origin iframe resources a proper finished state and
MemoryCache response-source classification under SI.

Test: 
http/tests/site-isolation/inspector/network/cross-origin-iframe-network-memory-cache-source-map-url.html

* 
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-memory-cache-source-map-url-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/inspector/network/cross-origin-iframe-network-memory-cache-source-map-url.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/inspector/network/resources/stylesheet-with-source-map-header-cacheable.py:
 Added.
* Source/WebCore/inspector/InspectorResourceUtilities.h:
* Source/WebCore/loader/cache/CachedResource.h:
* Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp:
(Inspector::ProxyingNetworkAgent::requestServedFromMemoryCache):
* Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h:
* Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.messages.in:
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp:
(WebKit::FrameNetworkAgentProxy::didLoadResourceFromMemoryCache):

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



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

Reply via email to