diff --git a/spec.bs b/spec.bs index 6c52ca21..a37f0cfd 100644 --- a/spec.bs +++ b/spec.bs @@ -285,12 +285,14 @@ Each <{fencedframe}> has a config, which is either a 1. Let |url| be the [=URL record=] about:blank. 1. Parse |element|'s [=fencedframe/config=]'s - [=fencedframeconfig/url=] relative to |element|'s [=Node/node document=]. If this is - successful, then set [=url=] to the resulting URL record. + [=fencedframeconfig/config=]'s [=fenced frame config/mapped url=]'s [=mapped url/value=] + relative to |element|'s [=Node/node document=]. If this is successful, then set [=url=] to the + resulting URL record. 1. [=Navigate=] |element|'s [=fenced navigable container/fenced navigable=] to |url| using |element|'s [=Node/node document=], with [=historyHandling=] set to "`replace`" , and [=referrerPolicy=] set to "`no-referrer`". + TODO: generate and store the config instance
@@ -578,7 +580,7 @@ A fenced frame config is a struct with the following [=struct/ : nested configs :: null, or a struct with the following fields: : value - :: a sequence of [=fenced frame configs=] + :: a [=list=] of [=fenced frame configs=] : visibility :: a [=visibility=] @@ -674,10 +676,18 @@ A fenced frame config instance is a struct with the following :: 1. If |config|'s [=fenced frame config/nested configs=] is null, set to null. - 1. Otherwise, set to an [=ordered map=], where for each [=fenced frame config=] in - |config|'s [=fenced frame config/nested configs=]'s [=nested configs/value=], there is - an entry where the key is a randomly sampled [=urn uuid=] and the value is the [=fenced - frame config=]. TODO: Write this in the proper syntax + 1. Otherwise: + + 1. Let |results| be an empty [=ordered map=]. + + 1. [=list/For each=] |nested config| of |config|'s [=fenced frame config/nested + configs=]'s [=nested configs/value=]: + + 1. Let |urn| be a random, unique [=urn uuid=]. + + 1. [=map/Set=] |results|[|urn|] to |nested config|. + + 1. Set [=fenced frame config instance/nested configs=] to |results|. : [=fenced frame config instance/partition nonce=] :: a random, unique [=partition nonce=] @@ -699,11 +709,11 @@ maps to an internal [=fenced frame config=] [=struct=]. [Exposed=Window] interface FencedFrameConfig { - constructor(USVString url); - readonly attribute FencedFrameConfigURL? url; - readonly attribute FencedFrameConfigSize? width; - readonly attribute FencedFrameConfigSize? height; + readonly attribute FencedFrameConfigSize? containerWidth; + readonly attribute FencedFrameConfigSize? containerHeight; + readonly attribute FencedFrameConfigSize? contentWidth; + readonly attribute FencedFrameConfigSize? contentHeight; undefined setSharedStorageContext(DOMString contextString); }; @@ -711,32 +721,72 @@ maps to an internal [=fenced frame config=] [=struct=]. Issue: Fix the "indistinguishable" IDL bug with the unions above. -Each {{FencedFrameConfig}} has a url, which is a [=URL=]. +Each {{FencedFrameConfig}} has two internal members: urn, which is a [=urn uuid=], and config, which is a [=fenced frame config=]. -1. TODO: add more fields to {{FencedFrameConfig}} +TODO: add more fields to {{FencedFrameConfig}}
The {{FencedFrameConfig/url}} IDL attribute getter steps are: - 1. TODO + 1. If {{FencedFrameConfig}}'s [=fencedframeconfig/config=]'s [=fenced frame config/mapped url=]'s + [=mapped url/visibility=] is [=visibility/transparent=], return the [=fenced frame config/ + mapped url=]'s [=mapped url/value=]. + + 1. Otherwise, return `"opaque"`.
-
- The {{FencedFrameConfig/width}} IDL attribute getter steps are: +
+ The {{FencedFrameConfig/containerWidth}} IDL attribute getter steps are: - 1. TODO + 1. If [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/container size=] is null, + return null. + + 1. Return [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/container size=]'s + [=size/width=].
-
- The {{FencedFrameConfig/height}} IDL attribute getter steps are: +
+ The {{FencedFrameConfig/containerHeight}} IDL attribute getter steps are: - 1. TODO + 1. If [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/container size=] is null, + return null. + + 1. Return [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/container size=]'s + [=size/height=]. +
+ +
+ The {{FencedFrameConfig/contentWidth}} IDL attribute getter steps are: + + 1. If [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/content size=] is null, + return null. + + 1. If [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/content size=]'s [=content + size/visibility=] is [=visibility/transparent=], return the [=fenced frame config/content + size=]'s [=content size/value=]'s [=size/width=]. + + 1. Otherwise, return `"opaque"`. +
+ +
+ The {{FencedFrameConfig/contentHeight}} IDL attribute getter steps are: + + 1. If [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/content size=] is null, + return null. + + 1. If [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/content size=]'s [=content + size/visibility=] is [=visibility/transparent=], return the [=fenced frame config/content + size=]'s [=content size/value=]'s [=size/height=]. + + 1. Otherwise, return `"opaque"`.
- The setSharedStorageContext(contextString) method steps are: + The setSharedStorageContext(|contextString|) method steps + are: - 1. TODO + 1. Set [=this=]'s [=fencedframeconfig/config=]'s [=fenced frame config/embedder shared storage + context=] to |contextString|.

The {{Fence}} interface

@@ -769,7 +819,7 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface.
- The reportEvent(event) method steps are: + The reportEvent(|event|) method steps are: 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=associated Document=]'s [=node navigable=]'s [=navigable/traversable navigable=]'s [=fenced frame config instance=]. @@ -793,7 +843,7 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface.
- The setReportEventDataForAutomaticBeacons(event) + The setReportEventDataForAutomaticBeacons(|event|) method steps are: 1. Let |instance| be [=this=]'s [=relevant global object=]'s [=associated Document=]'s [=node @@ -807,7 +857,7 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface. 1. If |instance|'s [=fenced frame config instance/fenced frame reporter=] is null, then return. - 1. Run [=set automatic beacon data=] with event and |instance|'s + 1. Run [=set automatic beacon data=] with |event| and |instance|'s [=fenced frame config instance/fenced frame reporter=].
@@ -830,7 +880,10 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface. 1. [=map/For each=] |urn| → |config| of |instance|'s [=fenced frame config instance/nested configs=]: - 1. TODO: construct a {{FencedFrameConfig}} from |config| and |urn|. + 1. [=list/Extend=] |results| with a {{FencedFrameConfig}} where the {{FencedFrameConfig}}'s + [=fencedframeconfig/urn=] is |urn| and the {{FencedFrameConfig}}'s [=fencedframeconfig/ + config=] is |config|. + TODO: phrase the constructor correctly. 1. Return |results|.