- From: Ming-Ying Chung <notifications@github.com>
- Date: Tue, 10 Dec 2024 22:52:45 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1647/review/2494464819@github.com>
@mingyc commented on this pull request.
> +
+
+<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.
+
+ <li>
+ <p>For each <var>otherNavigable</var> in <var>document</var>'s <a>node navigable</a>'s
+ <a for=navigable>top-level traversable</a>'s <a>inclusive descendant navigables</a>:
+
+ <p class=note>This algorithm iterates over the entire navigable tree. It accumulates quota from
```
This algorithm iterates over the entire navigable tree.
```
Given the following example
```
root (a.com) -> frame_1 (a.com)
-> frame_2 (a.com)
-> frame_3 (b.com)
-> frame_4 (b.com)
```
Let document be `frame_3` on its navigation, running the algorithm gives the following
* `quotaForOrigin` = 64 kb
* `quota` = 8*2 kb, as the following step is run twice, on `frame_3` and `frame_4`:
```
Otherwise, if otherContainer’s subframe reserved deferred-fetch quota is minimal
subframe deferred-fetch quota and otherDocument is allowed to use the policy-
controlled feature "deferred-fetch-minimal", then increment quota by minimal
subframe deferred-fetch quota.
```
* return 64 kb (quotaForOrigin)
But the quota for `frame_3` (or `frame_4`) should just be `8kb` by default?
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647#pullrequestreview-2494464819
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fetch/pull/1647/review/2494464819@github.com>
Received on Wednesday, 11 December 2024 06:52:49 UTC