Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5e7e08e65377c9288676091807a9425286ed872
https://github.com/WebKit/WebKit/commit/e5e7e08e65377c9288676091807a9425286ed872
Author: Ryosuke Niwa <[email protected]>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
M LayoutTests/platform/ios-site-isolation/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/loader/SubresourceLoader.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
[Site Isolation] http/wpt/fetch/fetch-metadata-for-sandbox-iframes.html fails
https://bugs.webkit.org/show_bug.cgi?id=313369
Reviewed by Chris Dumez.
When a subframe navigation triggers a process swap (e.g., localhost ->
127.0.0.1)
and a server redirect sends it back to the parent's site (127.0.0.1 ->
localhost),
the UIProcess continues the load in the parent's process. The new process
computes
Sec-Fetch-Site fresh - context origin = localhost (inherited from parent),
request
URL = localhost - yielding "same-origin". The cross-site redirect through
127.0.0.1
is lost.
Fixed the buy by passing navigation.originalRequest() in LoadParameters's
originalRequest when continuing a redirect in
loadContinuingInNonInitiatingProcess
and continueNavigationInNewProcess subframe paths. In computeFetchMetadataSite,
when the DocumentLoader is a continuing load after a provisional load started
and
has a different original URL, recompute Sec-Fetch-Site by evaluating the
original
URL first, then degrading for the redirect.
Tests: http/wpt/fetch/fetch-metadata-for-sandbox-iframes-reuse.html
http/wpt/fetch/fetch-metadata-for-sandbox-iframes.html
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::computeFetchMetadataSite):
(WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
* Source/WebCore/loader/cache/CachedResourceLoader.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
Canonical link: https://commits.webkit.org/312260@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications