Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f0e9cecd4bb5cc9e457e8acf85a25c04b695c939
https://github.com/WebKit/WebKit/commit/f0e9cecd4bb5cc9e457e8acf85a25c04b695c939
Author: Sihui Liu <[email protected]>
Date: 2026-09-08 (Tue, 08 Sep 2026)
Changed paths:
M Source/WebKit/Shared/LoadParameters.h
M Source/WebKit/Shared/LoadParameters.serialization.in
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] Removing sandbox attribute does not clear frame's sandbox
flags on a same-process navigation
https://bugs.webkit.org/show_bug.cgi?id=323635
rdar://186867877
Reviewed by Per Arne Vollan.
When a navigation stays in the process the frame is already in, the frame's
sandbox flags are delivered by
LoadParameters and WebPage::loadRequest applies them only when the set is
non-empty. Removing the sandbox attribute
produces an empty set, which is indistinguishable from "this load carries no
sandbox information", so the update is
skipped: the reused LocalFrame keeps its old flags and the newly committed
Document inherits them.
Made LoadParameters::effectiveSandboxFlags a std::optional so that "clear the
flags" and "no flags were set" are
distinguishable, and apply it whenever it is engaged. Only the two Site
Isolation navigation-continuation paths in
WebPageProxy populate it; every other sender leaves it std::nullopt and keeps
skipping the update, as the previous
default-constructed empty set already did.
Tests: SiteIsolation.SandboxFlagsRemovedBeforeSameSiteNavigation
* Source/WebKit/Shared/LoadParameters.h:
* Source/WebKit/Shared/LoadParameters.serialization.in:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation,
SandboxFlagsRemovedBeforeSameSiteNavigation)):
Canonical link: https://commits.webkit.org/320676@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications