Skip to content

Commit ff2d11c

Browse files
committed
Improve switch statement
1 parent 870671c commit ff2d11c

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

fetch.bs

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7011,41 +7011,44 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70117011

70127012
<ol>
70137013
<li><p>Let <var>navigable</var> be <var>controlDocument</var>'s <a>node navigable</a>.
7014+
7015+
<li><p>Let <var>isTopLevel</var> be true if <var>controlDocument</var>'s <a>node navigable</a> is a
7016+
<a for=/>top-level traversable</a>; otherwise false.
7017+
7018+
<li><p>Let <var>deferredFetchAllowed</var> be true if <var>controlDocument</var> is
7019+
<a>allowed to use</a> the <a>policy-controlled feature</a> "{{PermissionsPolicy/deferred-fetch}}";
7020+
otherwise false.
7021+
7022+
<li><p>Let <var>deferredFetchMinimalAllowed</var> be true if <var>controlDocument</var> is
7023+
<a>allowed to use</a> the <a>policy-controlled feature</a>
7024+
"{{PermissionsPolicy/deferred-fetch-minimal}}"; otherwise false.
7025+
70147026
<li>
70157027
<p>Let <var>quota</var> be the result of the first matching statement:
70167028

70177029
<dl class=switch>
7018-
<dt><var>controlDocument</var>'s <a>node navigable</a> is a
7019-
<a for=/>top-level traversable</a> and <var>controlDocument</var> is not <a>allowed to use</a>
7020-
the <a>policy-controlled feature</a> "{{PermissionsPolicy/deferred-fetch}}"
7030+
<dt><var>isTopLevel</var> is true and <var>deferredFetchAllowed</var> is false
70217031
<dd>0
70227032

7023-
<dt><var>controlDocument</var>'s <a>node navigable</a> is a
7024-
<a for=/>top-level traversable</a> and <var>controlDocument</var> is not <a>allowed to use</a>
7025-
the <a>policy-controlled feature</a> "{{PermissionsPolicy/deferred-fetch-minimal}}"
7033+
<dt><var>isTopLevel</var> is true and <var>deferredFetchMinimalAllowed</var> is false
70267034
<dd>
70277035
<p>640 kibibytes
70287036
<p class="note allow-2119">640kb should be enough for everyone.
70297037

7030-
<dt><var>controlDocument</var>'s <a>node navigable</a> is a <a for=/>top-level traversable</a>
7031-
and <a>allowed to use</a> the
7032-
<a>policy-controlled feature</a> "{{PermissionsPolicy/deferred-fetch-minimal}}"
7038+
<dt><var>isTopLevel</var> is true
70337039
<dd>
70347040
<p>512 kibibytes
70357041
<p class=note>The default of 640 kibibytes, decremented By
70367042
<a>quota reserved for <code>deferred-fetch-minimal</code></a>)
70377043

7038-
7039-
<dt><var>controlDocument</var>'s <a>node navigable</a>'s <a>navigable container</a>'s
7040-
<a>reserved deferred-fetch quota</a> is <a for="reserved deferred-fetch quota">normal quota</a>,
7041-
and <var>controlDocument</var> is <a>allowed to use</a> the <a>policy-controlled feature</a>
7042-
"{{PermissionsPolicy/deferred-fetch}}"
7044+
<dt><var>deferredFetchAllowed</var> is true, and <var>navigable</var>'s
7045+
<a>navigable container</a>'s <a>reserved deferred-fetch quota</a> is
7046+
<a for="reserved deferred-fetch quota">normal quota</a>
70437047
<dd><a for="reserved deferred-fetch quota">normal quota</a>
70447048

7045-
<dt><var>controlDocument</var>'s <a>node navigable</a>'s <a>navigable container</a>'s
7046-
<a>reserved deferred-fetch quota</a> is <a for="reserved deferred-fetch quota">minimal quota</a>,
7047-
and <var>controlDocument</var> is <a>allowed to use</a> the <a>policy-controlled feature</a>
7048-
"{{PermissionsPolicy/deferred-fetch-minimal}}"
7049+
<dt><var>deferredFetchMinimalAllowed</var> is true, and <var>navigable</var>'s
7050+
<a>navigable container</a>'s <a>reserved deferred-fetch quota</a> is
7051+
<a for="reserved deferred-fetch quota">minimal quota</a>
70497052
<dd><a for="reserved deferred-fetch quota">minimal quota</a>
70507053
</dl>
70517054

0 commit comments

Comments
 (0)