Skip to content

Commit cb85aad

Browse files
committed
Clarify containers in algo
1 parent 664ba39 commit cb85aad

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

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

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

70077007
<ol>
70087008
<li><p>Let <var>quota</var> be 0.
70097009

70107010
<li><p>Let <var>quotaForOrigin</var> be 64 kibibytes.
70117011

70127012
<li>
7013-
<p>For each <var>otherNavigable</var> of <var>document</var>'s <a>node navigable</a>'s
7013+
<p>For each <var>otherNavigable</var> of <var>requestClientDocument</var>'s <a>node navigable</a>'s
70147014
<a for=navigable>top-level traversable</a>'s <a>inclusive descendant navigables</a>:
70157015

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

70217021
<ol>
70227022
<li><p>Let <var>otherDocument</var> be <var>otherNavigable</var>'s <a>active document</a>.
7023+
<li><p>Let <var>otherContainer</var> be <var>otherNavigable</var>'s <a>navigable container</a>.
70237024

70247025
<li>
7025-
<p>If <var>document</var>'s <a for=Document>origin</a> is <a>same origin</a> with
7026+
<p>If <var>requestClientDocument</var>'s <a for=Document>origin</a> is <a>same origin</a> with
70267027
<var>otherDocument</var>'s <a for=Document>origin</a>, then:
70277028
<ol>
70287029
<li>
7029-
<p>If <var>otherDocument</var>'s <a>node navigable</a> is a
7030-
<a for=/>top-level traversable</a>, then:
7030+
<p>If <var>otherContainer</var> is null, then:
70317031

70327032
<p class=note>Initialize the quota from the top-level traversable.
70337033

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

70517051
<li>
70527052
<p>Otherwise, if any of the following conditions is true:
70537053
<ul class=brief>
7054-
<li><p><var>otherNavigable</var>'s <a>navigable container</a>'s
7055-
<a>nested document reserved deferred-fetch quota</a> is
7056-
<a>optional nested document deferred-fetch quota</a>, and <var>otherDocument</var> is
7054+
<li><p><var>otherContainer</var>'s <a>reserved deferred-fetch quota</a> is
7055+
<a for="reserved deferred-fetch quota">normal</a>, and <var>otherDocument</var> is
70577056
<a>allowed to use</a> the <a>policy-controlled feature</a>
70587057
"{{PermissionsPolicy/deferred-fetch}}"
70597058

7060-
<li><p><var>otherNavigable</var>'s <a>navigable container</a>'s
7061-
<a>nested document reserved deferred-fetch quota</a> is
7062-
<a>minimal nested document deferred-fetch quota</a>, and <var>otherDocument</var> is
7059+
<li><p><var>otherContainer</var>'s <a>reserved deferred-fetch quota</a> is
7060+
<a for="reserved deferred-fetch quota">minimal</a>, and <var>otherDocument</var> is
70637061
<a>allowed to use</a> the <a>policy-controlled feature</a>
70647062
"{{PermissionsPolicy/deferred-fetch-minimal}}"
70657063
</ul>
70667064

7067-
<p>then increment <var>quota</var> by <var>otherNavigable</var>'s <a>navigable container</a>'s
7068-
<a>nested document reserved deferred-fetch quota</a>.
7065+
<p>then increment <var>quota</var> by <var>otherContainer</var>'s
7066+
<a>reserved deferred-fetch quota</a>.
70697067

70707068
<li>
70717069
<p><a for=list>For each</a> <a>deferred fetch record</a> <var>deferredRecord</var> of
@@ -7084,9 +7082,9 @@ descendants share a quota of 384 kibibytes. That value is computed as such:
70847082
</ol>
70857083

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

70927090
<li><p>If <var>quota</var> is less than 0, than return 0.
@@ -7118,8 +7116,8 @@ shared.
71187116
for "{{PermissionsPolicy/deferred-fetch}}", <var>container</var> and <var>originToNavigateTo</var>
71197117
is <code>Enabled</code>, and the <a>available deferred-fetch quota</a> for
71207118
<var>container</var>'s <a>container document</a> is equal or greater than
7121-
<a>optional nested document deferred-fetch quota</a>, then set <var>container</var>'s
7122-
<a>reserved deferred-fetch quota</a> to <a>optional nested document deferred-fetch quota</a> and
7119+
<a for="reserved deferred-fetch quota">normal</a>, then set <var>container</var>'s
7120+
<a>reserved deferred-fetch quota</a> to <a for="reserved deferred-fetch quota">normal</a> and
71237121
return.
71247122

71257123
<li><p>If the <a data-lt="define an inherited policy for feature in container">inherited policy</a>
@@ -7135,11 +7133,11 @@ shared.
71357133
<a>node navigable</a>'s <a for=navigable>top-level traversable</a>'s
71367134
<a>descendant navigables</a>, <a for=list data-lt=remove>removing</a> any <a for=/>navigable</a>
71377135
whose <a>reserved deferred-fetch quota</a> is not
7138-
<a>minimal nested document deferred-fetch quota</a> .
7136+
<a for="reserved deferred-fetch quota">minimal</a> .
71397137

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

0 commit comments

Comments
 (0)