Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3b350434b86d1d50ddca79cbcd057aa3cf7f106a
https://github.com/WebKit/WebKit/commit/3b350434b86d1d50ddca79cbcd057aa3cf7f106a
Author: Rupin Mittal <[email protected]>
Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths:
M LayoutTests/platform/ios-site-isolation/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/dom/Document.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
[Site Isolation] 2x resourceLoadStatistics/omit-document-referrer* tests are
failing
https://bugs.webkit.org/show_bug.cgi?id=316971
rdar://179440666
Reviewed by Alex Christensen.
These tests check that if advancedPrivacyProtectionsEnabled=true, then
document.referrer is omitted in third-party iframes. With site isolation on,
the tests fail because the referrer is not omitted.
Document::referrerForBindings() returns the referrer instead of omitting it
when it cannot access the main frame document, which is what happens with site
isolation enabled. We make the decision to omit the referrer if the
AdvancedPrivacyProtections::BaselineProtections flag is on. Currently, this flag
is only set on the main frame's DocumentLoader (we need the main frame's
document
to access this).
We fix this issue by ensuring that the flag is set on the DocumentLoader of a
third-party iframe as well. We do this by setting the flag on the LoadParameters
that are sent to WebPage::loadRequest() in continueNavigationInNewProcess so
that
they eventually make it to the DocumentLoader. Document::referrerForBindings()
can then check the flag on the current Document's loader.
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::referrerForBindings):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
Canonical link: https://commits.webkit.org/315114@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications