From 9fb8ef1a1afc87772f5eef699fff9902d0138923 Mon Sep 17 00:00:00 2001 From: Dominic Farolino Date: Mon, 22 May 2023 07:55:03 -0400 Subject: [PATCH 1/2] Move fenced frame config instance to BCG --- spec.bs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/spec.bs b/spec.bs index 89cb278a..19b91009 100644 --- a/spec.bs +++ b/spec.bs @@ -539,8 +539,8 @@ of their fenced frame configs in order to ensure that they have considered the p of each field, though they may choose to set the values to null. Each time a <{fencedframe}> navigates to a [=fenced frame config=], it is instantiated as a new -[=fenced frame config instance=], which governs that particular context inside the [=fenced -navigable container/fenced navigable=]. +[=fenced frame config instance=], which governs the particular [=browsing context group=] inside the +[=fenced navigable container/fenced navigable=].

The [=fenced frame config=] [=struct=]

@@ -945,17 +945,16 @@ A fenced frame config instance is a struct with the following :: |config|'s [=fenced frame config/embedder shared storage context=] -Each [=navigable=] has a fenced frame config instance, which is a [=fenced -frame config instance=] or null, initially null. +Each [=browsing context=] has a fenced frame config instance, +which is a [=fenced frame config instance=] or null, initially null. -Advisement: This [=navigable/fenced frame config instance=] should really exist on [=traversable -navigable=], specifically a [=fenced navigable container/fenced navigable=], however until -third-party cookies are deprecated, this -specification supports many of the <{fencedframe}> constructs on the <{iframe}> element. This -requires that for the short term, a normal [=navigable container/content navigable=] be able to load -a [=fenced frame config=], and therefore have access to the navigation's corresponding [=fenced -frame config instance=]. +specification supports many of the <{fencedframe}> concepts on the <{iframe}> element. This requires +that for the short term, a normal [=navigable container/content navigable=] be able to load a +[=fenced frame config=], and therefore have access to the navigation's corresponding [=fenced frame +config instance=].

The {{FencedFrameConfig}} interface

From bed6c952f40c742fc9181562851c0e8d3e154f95 Mon Sep 17 00:00:00 2001 From: Dominic Farolino Date: Mon, 22 May 2023 09:23:06 -0400 Subject: [PATCH 2/2] Finish --- spec.bs | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/spec.bs b/spec.bs index 19b91009..4e70834c 100644 --- a/spec.bs +++ b/spec.bs @@ -1067,8 +1067,8 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface.
The reportEvent(|event|) method steps are: - 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=Window/navigable=]'s - [=navigable/traversable navigable=]'s [=navigable/fenced frame config instance=]. + 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=Window/browsing context=]'s + [=browsing context/fenced frame config instance=]. 1. If |instance| is null, then return. @@ -1098,8 +1098,8 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface. 1. If |event|'s {{FenceEvent/eventType}} is not `"reserved.top_navigation"`, return. - 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=Window/navigable=]'s - [=navigable/traversable navigable=]'s [=navigable/fenced frame config instance=]. + 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=Window/browsing context=]'s + [=browsing context/fenced frame config instance=]. 1. If |instance| is null, then return. @@ -1126,8 +1126,8 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface.
The getNestedConfigs() method steps are: - 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=Window/navigable=]'s - [=navigable/traversable navigable=]'s [=navigable/fenced frame config instance=]. + 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=Window/browsing context=]'s + [=browsing context/fenced frame config instance=]. 1. If |instance| is null, then return. @@ -1201,8 +1201,8 @@ Each {{Window}} object has an associated fence, which is a
The fence getter steps are: - 1. If [=this=]'s [=Window/navigable=]'s [=navigable/fenced frame config instance=] is not null, - then return [=this=]'s [=Window/fence=]. + 1. If [=this=]'s [=Window/browsing context=]'s [=browsing context/fenced frame config instance=] + is not null, then return [=this=]'s [=Window/fence=]. 1. Return null. @@ -2033,15 +2033,16 @@ config/effective enabled permissions=] defines the exclusive list of [=policy-co that will be enabled in the {{Document}} (all others will be disabled). During navigation, the {{FencedFrameConfig}}'s [=fencedframeconfig/config=] [=instantiate a -config|instantiates=] a [=navigable/fenced frame config instance=] that is stored on the [=fenced -navigable container/fenced navigable=]. This navigable's [=navigable/fenced frame config -instance=]'s [=fenced frame config instance/effective enabled permissions=] is consulted [=Should -navigation response to navigation request be blocked by Permissions Policy?|during navigation=]. A -<{fencedframe}> navigation can only succeed if the [=Document/permissions policy=] for the -navigation's resulting {{Document}} has an [=permissions policy/inherited policy=] such that the -[=inherited policy for a feature|inherited policy value=] is "`Enabled`" for each feature in the -[=fenced frame config/effective enabled permissions=]. Otherwise the environment the <{fencedframe}> -is embedded in is deemed unsuitable for the [=fenced frame config=], and the navigation is blocked. +config|instantiates=] a [=browsing context/fenced frame config instance=] that is stored on the +[=browsing context=] in the [=fenced navigable container/fenced navigable=]. This browsing context's +[=browsing context/fenced frame config instance=]'s [=fenced frame config instance/effective enabled +permissions=] is consulted [=Should navigation response to navigation request be blocked by +Permissions Policy?|during navigation=]. A <{fencedframe}> navigation can only succeed if the +[=Document/permissions policy=] for the navigation's resulting {{Document}} has an [=permissions +policy/inherited policy=] such that the [=inherited policy for a feature|inherited policy value=] is +"`Enabled`" for each feature in the [=fenced frame config/effective enabled permissions=]. Otherwise +the environment the <{fencedframe}> is embedded in is deemed unsuitable for the [=fenced frame +config=], and the navigation is blocked. At the same time, to make sure that a <{fencedframe}>'s embedder does not directly influence content in the frame based on that navigation's [=navigation params/origin=] (since the origin is derived @@ -2186,8 +2187,14 @@ achieve the outcomes described in the above explanatory content. 1. Let |origin| be |navigationParams|'s [=navigation params/origin=]. - 1. Let |effective permissions| be the |navigable|'s [=navigable/fenced frame config instance=]'s - [=fenced frame config instance/effective enabled permissions=]. + 1. Let |effective permissions| be the |navigable|'s [=navigable/active browsing context=]'s + [=browsing context/fenced frame config instance=]'s [=fenced frame config instance/effective + enabled permissions=]. + + Issue: Per work omitted in [pull request + #84](https://github.com/WICG/fenced-frame/pull/84#discussion_r1186531028), the config instance + has not yet been assigned to the browsing context. We should consider storing the instance + inside |navigationParams| and reference it from here instead. 1. Let |permissions policy| be the result of [$Create a Permissions Policy for a navigable| creating a permissions policy$] given |navigable|'s [=fenced navigable container=], |origin|,