Skip to content

Commit 9108e9b

Browse files
authored
Spec: disallow fenced frames setting contextId/filteringIdMaxBytes. (#151)
1 parent 04cae6d commit 9108e9b

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

spec.bs

+25-14
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ spec: webdriver; urlPrefix: https://w3c.github.io/webdriver/
4040
type: dfn
4141
text: getting a property; url: dfn-getting-properties
4242
text: error code; url: dfn-error-code
43+
spec: fenced-frame; urlPrefix: https://wicg.github.io/fenced-frame/
44+
type: dfn;
45+
for: browsing context;
46+
text: fenced frame config instance; url: browsing-context-fenced-frame-config-instance
4347
</pre>
4448

4549
<pre class=link-defaults>
@@ -1235,9 +1239,9 @@ steps. They return an [=aggregation coordinator=], null or a {{DOMException}}:
12351239

12361240
<div algorithm>
12371241
To <dfn>obtain the pre-specified report parameters</dfn> given a
1238-
{{SharedStorageRunOperationMethodOptions}} |options|, perform the following
1239-
steps. They return a [=pre-specified report parameters=], null, or a
1240-
{{DOMException}}:
1242+
{{SharedStorageRunOperationMethodOptions}} |options| and a [=browsing context=]
1243+
|context|, perform the following steps. They return a [=pre-specified report
1244+
parameters=], null, or a {{DOMException}}:
12411245
1. If |options|["{{SharedStorageRunOperationMethodOptions/privateAggregationConfig}}"]
12421246
does not [=map/exist=], return null.
12431247
1. Let |privateAggregationConfig| be
@@ -1254,6 +1258,10 @@ steps. They return a [=pre-specified report parameters=], null, or a
12541258
|privateAggregationConfig|["{{SharedStoragePrivateAggregationConfig/filteringIdMaxBytes}}"].
12551259
1. If |filteringIdMaxBytes| is not [=set/contained=] in the [=valid filtering ID
12561260
max bytes range=], return a new {{DOMException}} with name "`DataError`".
1261+
1. If |context|'s [=browsing context/fenced frame config instance=] is not null:
1262+
1. If |filteringIdMaxBytes| is not the [=default filtering ID max bytes=] or
1263+
|contextId| is not null, return a new {{DOMException}} with name
1264+
"`DataError`".
12571265
1. Return a new [=pre-specified report parameters=] with the items:
12581266
: [=pre-specified report parameters/context ID=]
12591267
:: |contextId|
@@ -1262,13 +1270,16 @@ steps. They return a [=pre-specified report parameters=], null, or a
12621270

12631271
</div>
12641272

1265-
The {{SharedStorage}} {{SharedStorage/run()}} method steps are modified in four
1266-
ways. First, add the following steps just after step 2 ("If
1267-
{{Worklet/addModule()}} has not yet been called, ..."), renumbering later steps
1268-
as appropriate:
1273+
The {{SharedStorageWorklet}}'s {{SharedStorageWorklet/run()}} method steps are
1274+
modified in four ways. First, add the following steps just after step 4
1275+
("[=Assert=]: <var ignore>window</var> is a [=Window=]"), renumbering later
1276+
steps as appropriate:
12691277
<div algorithm="shared-storage-run-monkey-patch-1">
1270-
3. Let |preSpecifiedParams| be the result of [=obtaining the pre-specified
1271-
report parameters=] given |options|.
1278+
5. Let |context| be <var ignore>window</var>'s [=Window/browsing context=].
1279+
1. If |context| is null, then return [=a promise rejected with=] a
1280+
{{TypeError}}.
1281+
1. Let |preSpecifiedParams| be the result of [=obtaining the pre-specified
1282+
report parameters=] given |options| and |context|.
12721283
1. If |preSpecifiedParams| is a {{DOMException}}, return [=a promise rejected
12731284
with=] |preSpecifiedParams|.
12741285
1. Let |aggregationCoordinator| be the result of [=obtaining the aggregation
@@ -1326,12 +1337,12 @@ Finally, at the end of the same nested scope, add the following step:
13261337

13271338
</div>
13281339

1329-
The {{SharedStorage}} {{SharedStorage/selectURL()}} method steps are modified in
1330-
three ways. First, add the following steps just after step 5 ("If
1331-
{{Worklet/addModule()}} has not yet been called, ..."), renumbering later steps:
1340+
The {{SharedStorageWorklet}}'s {{SharedStorageWorklet/selectURL()}} method steps
1341+
are modified in three ways. First, add the following steps just after step 6
1342+
("If <var ignore>context</var> is null..."), renumbering later steps:
13321343
<div algorithm="shared-storage-selecturl-monkey-patch-1">
1333-
6. Let |preSpecifiedParams| be the result of [=obtaining the pre-specified
1334-
report parameters=] given |options|.
1344+
7. Let |preSpecifiedParams| be the result of [=obtaining the pre-specified
1345+
report parameters=] given |options| and <var ignore>context</var>.
13351346
1. If |preSpecifiedParams| is a {{DOMException}}, return [=a promise rejected
13361347
with=] |preSpecifiedParams|.
13371348
1. Let |aggregationCoordinator| be the result of [=obtaining the aggregation

0 commit comments

Comments
 (0)