- From: Ming-Ying Chung <notifications@github.com>
- Date: Mon, 09 Dec 2024 22:17:14 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1647/review/2491130192@github.com>
@mingyc commented on this pull request.
> +<a for=Document>URL</a>'s <a for=url>origin</a> is <a>same origin</a> with <var>b</var>'s
+<a for=Document>URL</a>'s <a for=url>origin</a>.
+</div>
+
+
+<div algorithm>
+<p>To get the <dfn>available deferred-fetch quota</dfn> given a {{Document}}
+<var>document</var> and an <a for=/>origin</a>-or-null <var>origin</var>:
+
+<ol>
+ <li><p>Let <var>quota</var> be zero.
+
+ <li>
+ <p>Let <var>quotaForOrigin</var> be 64 kibibytes.
+ <p class=note>
+
This `Note` section is empty. Does it miss anything?
> +
+ <li><p>If <var>otherDocument</var> is not
+ <a>allowed to use</a> the <a>policy-controlled feature</a>
+ {{PermissionPolicy/"deferred-fetch"}}, then return 0.
+
+ <li>
+ <p>Set <var>quota</var> be 640 kibibytes.
+ <p class="note allow-2119">640kb should be enough for everyone.
+
+ <li><p>If <var>otherDocument</var> is <a>allowed to use</a> the
+ <a>policy-controlled feature</a> {{PermissionPolicy/"deferred-fetch-minimal"}}, then
+ decrement <var>quota</var> by <a>deferred-fetch delegated quota</a>.
+ </ol>
+
+ <li>
+ <p>Otherwise,
In the rendered spec page, this `Otherwise`'s indentation is slightly misaligned with the above `If otherDocument’s node navigable is a top-level traversable, then:`
> + decrement <var>quota</var> by <a>deferred-fetch delegated quota</a>.
+ </ol>
+
+ <li>
+ <p>Otherwise,
+
+ <p class=note>This is a subframe, check if it inherits quota from its parent container based
+ on permissions policy. This would only be the case if the subframe and its parent do not share
+ quota, as quota is either shared or delegated.
+
+ <ol>
+ <li><p>Let <var>otherContainer</var> be <var>otherNavigable</var>'s
+ <a>navigable container</a>.
+
+ <li>
+ <p>If <var>otherContainer</var>'s <a>node document</a> and <var>otherDocument</var> do
```
Let otherContainer be otherNavigable’s navigable container.
If otherContainer’s node document and otherDocument do not share deferred-fetch quota, then:
```
* Combing the above two steps, does `otherContainernode document` just mean `otherNavigable`?
* If so, why not just say `otherNavigable` directly?
* If so, does `If otherContainer’s node document and otherDocument do not share deferred-fetch quota, then:` checking the quota against the same document?
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647#pullrequestreview-2491130192
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fetch/pull/1647/review/2491130192@github.com>
Received on Tuesday, 10 December 2024 06:17:18 UTC