Skip to content

Commit 6b4976b

Browse files
committed
Clarify containers in algo
1 parent aa3a789 commit 6b4976b

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

fetch.bs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ not <a for=Document>fully active</a>. It has the following <a for=struct>items</
27622762
</dl>
27632763

27642764
<p>Each <a>navigable container</a> has an associated number
2765-
<dfn>nested document reserved deferred-fetch quota</dfn>. Unless stated otherwise, it is 0.
2765+
<dfn>reserved deferred-fetch quota</dfn>. Unless stated otherwise, it is 0.
27662766

27672767
<hr>
27682768

@@ -7006,15 +7006,15 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70067006

70077007
<div algorithm>
70087008
<p>To get the <dfn>available deferred-fetch quota</dfn> given a {{Document}}
7009-
<var>document</var> and an <a for=/>origin</a>-or-null <var>origin</var>:
7009+
<var>requestClientDocument</var> and an <a for=/>origin</a>-or-null <var>origin</var>:
70107010

70117011
<ol>
70127012
<li><p>Let <var>quota</var> be 0.
70137013

70147014
<li><p>Let <var>quotaForOrigin</var> be 64 kibibytes.
70157015

70167016
<li>
7017-
<p>For each <var>otherNavigable</var> of <var>document</var>'s <a>node navigable</a>'s
7017+
<p>For each <var>otherNavigable</var> of <var>requestClientDocument</var>'s <a>node navigable</a>'s
70187018
<a for=navigable>top-level traversable</a>'s <a>inclusive descendant navigables</a>:
70197019

70207020
<p class=note>This algorithm iterates over the entire navigable tree. It accumulates quota from
@@ -7024,14 +7024,14 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70247024

70257025
<ol>
70267026
<li><p>Let <var>otherDocument</var> be <var>otherNavigable</var>'s <a>active document</a>.
7027+
<li><p>Let <var>otherContainer</var> be <var>otherNavigable</var>'s <a>navigable container</a>.
70277028

70287029
<li>
7029-
<p>If <var>document</var>'s <a for=Document>origin</a> is <a>same origin</a> with
7030+
<p>If <var>requestClientDocument</var>'s <a for=Document>origin</a> is <a>same origin</a> with
70307031
<var>otherDocument</var>'s <a for=Document>origin</a>, then:
70317032
<ol>
70327033
<li>
7033-
<p>If <var>otherDocument</var>'s <a>node navigable</a> is a
7034-
<a for=/>top-level traversable</a>, then:
7034+
<p>If <var>otherContainer</var> is null, then:
70357035

70367036
<p class=note>Initialize the quota from the top-level traversable.
70377037

@@ -7049,27 +7049,25 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70497049
<li><p>If <var>otherDocument</var> is <a>allowed to use</a> the
70507050
<a>policy-controlled feature</a> "{{PermissionsPolicy/deferred-fetch-minimal}}", then
70517051
decrement <var>quota</var> by <a>max containers with minimal quota</a>, multiplied by
7052-
<a>minimal nested document deferred-fetch quota</a>.
7052+
<a for="reserved deferred-fetch quota">minimal</a>.
70537053
</ol>
70547054

70557055
<li>
70567056
<p>Otherwise, if any of the following conditions is true:
70577057
<ul class=brief>
7058-
<li><p><var>otherNavigable</var>'s <a>navigable container</a>'s
7059-
<a>nested document reserved deferred-fetch quota</a> is
7060-
<a>optional nested document deferred-fetch quota</a>, and <var>otherDocument</var> is
7058+
<li><p><var>otherContainer</var>'s <a>reserved deferred-fetch quota</a> is
7059+
<a for="reserved deferred-fetch quota">normal</a>, and <var>otherDocument</var> is
70617060
<a>allowed to use</a> the <a>policy-controlled feature</a>
70627061
"{{PermissionsPolicy/deferred-fetch}}"
70637062

7064-
<li><p><var>otherNavigable</var>'s <a>navigable container</a>'s
7065-
<a>nested document reserved deferred-fetch quota</a> is
7066-
<a>minimal nested document deferred-fetch quota</a>, and <var>otherDocument</var> is
7063+
<li><p><var>otherContainer</var>'s <a>reserved deferred-fetch quota</a> is
7064+
<a for="reserved deferred-fetch quota">minimal</a>, and <var>otherDocument</var> is
70677065
<a>allowed to use</a> the <a>policy-controlled feature</a>
70687066
"{{PermissionsPolicy/deferred-fetch-minimal}}"
70697067
</ul>
70707068

7071-
<p>then increment <var>quota</var> by <var>otherNavigable</var>'s <a>navigable container</a>'s
7072-
<a>nested document reserved deferred-fetch quota</a>.
7069+
<p>then increment <var>quota</var> by <var>otherContainer</var>'s
7070+
<a>reserved deferred-fetch quota</a>.
70737071

70747072
<li>
70757073
<p><a for=list>For each</a> <a>deferred fetch record</a> <var>deferredRecord</var> of
@@ -7088,9 +7086,9 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70887086
</ol>
70897087

70907088
<li><p>Otherwise, if <var>otherDocument</var>'s <a>container document</a> is a {{Document}} whose
7091-
<a for=Document>origin</a> is <a>same origin</a> with <var>document</var>'s
7089+
<a for=Document>origin</a> is <a>same origin</a> with <var>requestClientDocument</var>'s
70927090
<a for=Document>origin</a>, then decrement <var>quota</var> by <var>otherNavigable</var>'s
7093-
<a>navigable container</a>'s <a>nested document reserved deferred-fetch quota</a>.
7091+
<a>navigable container</a>'s <a>reserved deferred-fetch quota</a>.
70947092
</ol>
70957093

70967094
<li><p>If <var>quota</var> is less than 0, than return 0.
@@ -7122,8 +7120,8 @@ shared.
71227120
for "{{PermissionsPolicy/deferred-fetch}}", <var>container</var> and <var>originToNavigateTo</var>
71237121
is <code>Enabled</code>, and the <a>available deferred-fetch quota</a> for
71247122
<var>container</var>'s <a>container document</a> is equal or greater than
7125-
<a>optional nested document deferred-fetch quota</a>, then set <var>container</var>'s
7126-
<a>reserved deferred-fetch quota</a> to <a>optional nested document deferred-fetch quota</a> and
7123+
<a for="reserved deferred-fetch quota">normal</a>, then set <var>container</var>'s
7124+
<a>reserved deferred-fetch quota</a> to <a for="reserved deferred-fetch quota">normal</a> and
71277125
return.
71287126

71297127
<li><p>If the <a data-lt="define an inherited policy for feature in container">inherited policy</a>
@@ -7139,11 +7137,11 @@ shared.
71397137
<a>node navigable</a>'s <a for=navigable>top-level traversable</a>'s
71407138
<a>descendant navigables</a>, <a for=list data-lt=remove>removing</a> any <a for=/>navigable</a>
71417139
whose <a>reserved deferred-fetch quota</a> is not
7142-
<a>minimal nested document deferred-fetch quota</a> .
7140+
<a for="reserved deferred-fetch quota">minimal</a> .
71437141

71447142
<li><p>If <var>containersWithReservedMinimalQuota</var>'s <a for=list>size</a> is less
71457143
than <a>max containers with minimal quota</a>, then set <var>container</var>'s
7146-
<a>reserved deferred-fetch quota</a> to <a>minimal nested document deferred-fetch quota</a>.
7144+
<a>reserved deferred-fetch quota</a> to <a for="reserved deferred-fetch quota">minimal</a>.
71477145
</ol>
71487146
</div>
71497147

0 commit comments

Comments
 (0)