RESOLVED FIXED318740
[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
Summary [Site Isolation] Web Inspector: Network domain sourceMappingURL is not forwar...
Qianlang Chen
Reported 2026-07-06 16:17:07 PDT
Follow-up to Bug 310251 (rdar://172894304), which forwards the CSS sourceMappingURL for cross-origin iframe stylesheets under Site Isolation. That change only covers the cold-load path; stylesheets served from WebCore's in-memory cache are not covered, so their source maps stop auto-linking in the Network panel. On the memory-cache path, the sourceMappingURL is neither computed nor delivered: 1. The header capture in BackendResourceDataStore::responseReceived never runs (that hook is not called for memory-cached resources), so no header-derived sourceMappingURL is stored. 2. LoadingFinished — the only message Bug 310251 taught to carry a sourceMappingURL — is never sent for a memory-cache hit. 3. The SI memory-cache path is also thinner than the legacy path. Legacy InspectorNetworkAgent builds a full Network.CachedResource protocol object (which has a sourceMapURL field) and ships it. ProxyingNetworkAgent::requestServedFromMemoryCache instead synthesizes a fake requestWillBeSent + responseReceived and stops there — no CachedResource object and no loadingFinished. So under SI there is currently no field or event on the memory-cache path that can carry a source-map URL to the frontend at all. A cross-origin iframe CSS file whose source map should auto-link will link on a cold load but silently stop linking once it is served from the memory cache — e.g. after a reload, on back/forward navigation, or when the same stylesheet is reused across frames. Same file, same headers, behavior differs by cache state; in the Network panel the source map simply does not appear for that stylesheet.
Attachments
Qianlang Chen
Comment 1 2026-07-06 16:27:52 PDT
Radar WebKit Bug Importer
Comment 2 2026-07-08 14:44:43 PDT
EWS
Comment 3 2026-07-08 17:11:21 PDT
Committed 316778@main (5ff5b2cf4386): <https://commits.webkit.org/316778@main> Reviewed commits have been landed. Closing PR #68796 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.