WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
313498
[Site Isolation] Document::isSecureContext ignores RemoteFrame ancestors
https://bugs.webkit.org/show_bug.cgi?id=313498
Summary
[Site Isolation] Document::isSecureContext ignores RemoteFrame ancestors
Anthony Tarbinian
Reported
2026-04-27 16:16:56 PDT
In Document::isSecureContext, WebKit walks the frame tree to check if all of a frame's ancestors are "secure". It does this to gate access to powerful web APIs such as navigator.geolocation. For each ancestor, we call Document::isDocumentSecure which performs checks to see if the frame is potentially trustworthy. Below is the implementation. It does the following: 1. If the document is sandboxed, it checks if the document's URL is trustworthy 2. Otherwise, check if the document's security origin is trustworthy. ``` static inline bool isDocumentSecure(const Document& document) { if (document.isSandboxed(SandboxFlag::Origin)) return isURLPotentiallyTrustworthy(document.url()); return document.securityOrigin().isPotentiallyTrustworthy(); } ``` With site isolation enabled, it is possible for some of the document's ancestors to be RemoteFrames in different processes. Currently, the code in Document::isSecureContext, only handles LocalFrames and silently skips any RemoteFrame ancestors. This bug causes imported/w3c/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html to fail with site isolation enabled.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-04-27 16:19:14 PDT
<
rdar://problem/175714384
>
EWS
Comment 2
2026-04-28 07:41:30 PDT
Committed
312199@main
(e211768ca32e): <
https://commits.webkit.org/312199@main
> Reviewed commits have been landed. Closing PR #63753 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug