-
Notifications
You must be signed in to change notification settings - Fork 179
Description
I've created a new WPT to discuss some details regarding iframes: https://wpt.fyi/results/fullscreen/api/navigate-iframe.sub.html?label=master&label=experimental&aligned
Specifically, Firefox does not allow a cross-origin iframe to navigate itself to be same-origin and obtain permissions that way. Other browsers do.
My interpretation of the spec is that Firefox is correct here because of the following:
According to the spec the
default originfor an iframe is itsdeclared origin
meaning, the src attribute...
https://w3c.github.io/webappsec-permissions-policy/#declared-origin
The
default allowlistfor 'fullscreen' is "'self'"
https://fullscreen.spec.whatwg.org/#permissions-policy-integration
'self':
The feature is allowed in documents in top-level traversables by default,
as well as those in child navigables whose document is same origin with
its parent’s document, when allowed in that Document. It is disallowed
by default in child navigables whose document is cross-origin with its
parent’s document.
https://w3c.github.io/webappsec-permissions-policy/#default-allowlists
Therefore a navigated iframe must not have fullscreen permissions unless the new origin matches the origin in the src attribute and is same-origin with the embedding page.
I'm not sure if I am missing something but it does seem like this might not have been the intended behavior and I would appreciate some clarification.