@@ -6857,13 +6857,13 @@ cross-origin or cross-agent subframes, each reserving 8 kibibytes.
6857
6857
6858
6858
<p> The top-level {{Document}} , and subsequently its subframes, can control how much of their quota
6859
6859
is delegates to cross-origin/cross-agent subframes, by using {{PermissionsPolicy}} .
6860
- By default, {{PermissionPolicy /"deferred-fetch-minimal"}} is enabled for any origin, while
6861
- {{PermissionPolicy /"deferred-fetch"}} is enabled for the top-level document's origin only.
6862
- By relaxing the {{PermissionPolicy /"deferred-fetch"}} policy for particular origins and subframes,
6860
+ By default, {{PermissionsPolicy /"deferred-fetch-minimal"}} is enabled for any origin, while
6861
+ {{PermissionsPolicy /"deferred-fetch"}} is enabled for the top-level document's origin only.
6862
+ By relaxing the {{PermissionsPolicy /"deferred-fetch"}} policy for particular origins and subframes,
6863
6863
the top-level document can allocate 64 kibibytes to those subframes. Similarly, by restricting the
6864
- {{PermissionPolicy /"deferred-fetch-minimal"}} policy for a particular origin or subframe, the
6864
+ {{PermissionsPolicy /"deferred-fetch-minimal"}} policy for a particular origin or subframe, the
6865
6865
document can prevent the iframe from reserving the 8 kibibytes it would receive by default. By
6866
- disabling {{PermissionPolicy /"deferred-fetch-minimal"}} for the top-level document itself, the
6866
+ disabling {{PermissionsPolicy /"deferred-fetch-minimal"}} for the top-level document itself, the
6867
6867
entire 128 kibibytes delegated quota is collected back into the main pool of 640 kibibytes.
6868
6868
6869
6869
<p> Out of the allocated quota for a {{Document}} , only 64 kibibytes can be used concurrently for the
@@ -6907,19 +6907,126 @@ calls would succeed and the last one would throw.
6907
6907
fetchLater("https://a.example.com", {body: a_12kb_body});
6908
6908
</code></pre>
6909
6909
6910
- <p> To make the previous example not throw, the top-level {{Document}} needs to delegate some of its
6911
- quota to <code> https://frame.example.com</code> , for example by serving the following header:
6912
- <pre><code> Permissions-Policy: deferred-fetch=(self "https://frame.example.com")</code></pre>
6910
+ <p> To make the previous example not throw, the top-level {{Document}} can delegate some of its quota
6911
+ to <code> https://frame.example.com</code> , for example by serving the following header:
6912
+ <pre><code class=lang-http> Permissions-Policy: deferred-fetch=(self "https://frame.example.com")</code></pre>
6913
+
6914
+ <p> The following tables illustrates how quota is distributed to different iframes, each table
6915
+ representing a different <a for=/>top-level traversable</a> ("tab").
6916
+
6917
+ <p> For a tree with its top-level <code> Permissions-Policy</code> header set to
6918
+ <code class=lang-http> deferred-fetch=(self "https://ok.example.com")</code> :
6919
+
6920
+ <table>
6921
+ <tr>
6922
+ <th> Window name
6923
+ <th> Parent
6924
+ <th> Initial origin
6925
+ <th> Current origin
6926
+ <th> Quota
6927
+ <tr>
6928
+ <td><code> top</code>
6929
+ <td><code> null</code>
6930
+ <td><code> https://me.example.com</code>
6931
+ <td><code> https://me.example.com</code>
6932
+ <td> 384kb (512kb - 64kb - 64kb). <code> d</code> and frame <code> g</code> were granted
6933
+ 64kb each, even though for <code> g</code> this quota ended up being unavilable.
6934
+ <tr>
6935
+ <td><code> a</code>
6936
+ <td><code> top</code>
6937
+ <td><code> https://me.example.com</code>
6938
+ <td><code> https://me.example.com</code>
6939
+ <td> Shared with <code> top</code> 's quota.
6940
+ <tr>
6941
+ <td><code> b</code>
6942
+ <td><code> a</code>
6943
+ <td><code> https://x.example.com</code>
6944
+ <td><code> https://x.example.com</code>
6945
+ <td> 8kb, due to the default {{PermissionsPolicy/"deferred-fetch-minimal"}} policy.
6946
+ <tr>
6947
+ <td><code> c</code>
6948
+ <td><code> top</code>
6949
+ <td><code> https://x.example.com</code>
6950
+ <td><code> https://x.example.com</code>
6951
+ <td> 8kb, due to the default {{PermissionsPolicy/"deferred-fetch-minimal"}} policy.
6952
+ <tr>
6953
+ <td><code> d</code>
6954
+ <td><code> top</code>
6955
+ <td><code> https://ok.example.com</code>
6956
+ <td><code> https://ok.example.com</code>
6957
+ <td> 64kb, due to the {{PermissionsPolicy/"deferred-fetch"}} policy.
6958
+ <tr>
6959
+ <td><code> e</code>
6960
+ <td><code> d</code>
6961
+ <td><code> https://x.example.com</code>
6962
+ <td><code> https://x.example.com</code>
6963
+ <td> 0, as its parent doesn't share the quota with the top-level document.
6964
+ <tr>
6965
+ <td><code> f</code>
6966
+ <td><code> d</code>
6967
+ <td><code> https://me.example.com</code>
6968
+ <td><code> https://me.example.com</code>
6969
+ <td> Shared with <code> top</code> 's quota.
6970
+ <tr>
6971
+ <td><code> g</code>
6972
+ <td><code> top</code>
6973
+ <td><code> https://ok.example.com</code>
6974
+ <td><code> https://x.example.com</code>
6975
+ <td> 0, as the reserved quota when navigating doesn't match the current {{PermissionsPolicy}} .
6976
+ <tr>
6977
+ <td><code> h</code>
6978
+ <td><code> top</code>
6979
+ <td><code> https://ok.example.com</code>
6980
+ <td><code> https://me.example.com</code>
6981
+ <td> Shared with <code> top</code> 's quota.
6982
+ </table>
6983
+
6984
+ <p> For a tree with its top-level <code> Permissions-Policy</code> header set to
6985
+ <code class=lang-http> deferred-fetch-minimal=(); deferred-fetch=(self https://ok.example.com)</code> :
6986
+
6987
+ <table>
6988
+ <tr>
6989
+ <th> Window name
6990
+ <th> Parent
6991
+ <th> Initial origin
6992
+ <th> Current origin
6993
+ <th> Quota
6994
+ <tr>
6995
+ <td><code> top</code>
6996
+ <td><code> null</code>
6997
+ <td><code> https://me.example.com</code>
6998
+ <td><code> https://me.example.com</code>
6999
+ <td> 576kb (640kb - 64kb). <code> c</code> was granted 64kb. Since {{PermissionsPolicy/"deferred-fetch-minimal"}}
7000
+ was explicitly disabled, the initial top-level quota is 640kb instead of 512kb.
7001
+ <tr>
7002
+ <td><code> a</code>
7003
+ <td><code> top</code>
7004
+ <td><code> https://me.example.com</code>
7005
+ <td><code> https://me.example.com</code>
7006
+ <td> Shared with <code> top</code> 's quota.
7007
+ <tr>
7008
+ <td><code> b</code>
7009
+ <td><code> a</code>
7010
+ <td><code> https://x.example.com</code>
7011
+ <td><code> https://x.example.com</code>
7012
+ <td> 0, due to the {{PermissionsPolicy/"deferred-fetch-minimal"}} being explicitly disabled.
7013
+ <tr>
7014
+ <td><code> c</code>
7015
+ <td><code> top</code>
7016
+ <td><code> https://ok.example.com</code>
7017
+ <td><code> https://ok.example.com</code>
7018
+ <td> 64kb, due to the {{PermissionsPolicy/"deferred-fetch"}} policy.
7019
+ </table>
6913
7020
6914
7021
</div>
6915
7022
6916
7023
6917
7024
<p> This specification defined a <a>policy-controlled feature</a> identified by the string
6918
- <dfn for=PermissionPolicy enum-value>"deferred-fetch"</dfn> . Its
7025
+ <dfn for=PermissionsPolicy enum-value>"deferred-fetch"</dfn> . Its
6919
7026
<a for="policy-controlled feature">default allowlist</a> is "<code> self</code> ".
6920
7027
6921
7028
<p> This specification defined a <a>policy-controlled feature</a> identified by the string
6922
- <dfn for=PermissionPolicy enum-value>"deferred-fetch-minimal"</dfn> . Its
7029
+ <dfn for=PermissionsPolicy enum-value>"deferred-fetch-minimal"</dfn> . Its
6923
7030
<a for="policy-controlled feature">default allowlist</a> is "<code> *</code> ".
6924
7031
6925
7032
<p> The <dfn>optional subframe deferred-fetch quota</dfn> is 64 kibibytes.
@@ -6971,14 +7078,14 @@ quota to <code>https://frame.example.com</code>, for example by serving the foll
6971
7078
6972
7079
<li><p> If <var> otherDocument</var> is not
6973
7080
<a>allowed to use</a> the <a>policy-controlled feature</a>
6974
- {{PermissionPolicy /"deferred-fetch"}} , then return 0.
7081
+ {{PermissionsPolicy /"deferred-fetch"}} , then return 0.
6975
7082
6976
7083
<li>
6977
7084
<p> Set <var> quota</var> be 640 kibibytes.
6978
7085
<p class="note allow-2119"> 640kb should be enough for everyone.
6979
7086
6980
7087
<li><p> If <var> otherDocument</var> is <a>allowed to use</a> the
6981
- <a>policy-controlled feature</a> {{PermissionPolicy /"deferred-fetch-minimal"}} , then
7088
+ <a>policy-controlled feature</a> {{PermissionsPolicy /"deferred-fetch-minimal"}} , then
6982
7089
decrement <var> quota</var> by <a>deferred-fetch delegated quota</a> .
6983
7090
</ol>
6984
7091
@@ -7001,14 +7108,14 @@ quota to <code>https://frame.example.com</code>, for example by serving the foll
7001
7108
<li><p> If <var> otherContainer</var> 's <a>subframe reserved deferred-fetch quota</a> is
7002
7109
<a>optional subframe deferred-fetch quota</a> , and <var> otherDocument</var> is
7003
7110
<a>allowed to use</a> the <a>policy-controlled feature</a>
7004
- {{PermissionPolicy /"deferred-fetch"}} , then increment <var> quota</var> by
7111
+ {{PermissionsPolicy /"deferred-fetch"}} , then increment <var> quota</var> by
7005
7112
<a>optional subframe deferred-fetch quota</a> .
7006
7113
7007
7114
<li><p> Otherwise, if <var> otherContainer</var> 's
7008
7115
<a>subframe reserved deferred-fetch quota</a> is
7009
7116
<a>minimal subframe deferred-fetch quota</a> and <var> otherDocument</var>
7010
7117
is <a>allowed to use</a> the <a>policy-controlled feature</a>
7011
- {{PermissionPolicy /"deferred-fetch-minimal"}} , then increment <var> quota</var> by
7118
+ {{PermissionsPolicy /"deferred-fetch-minimal"}} , then increment <var> quota</var> by
7012
7119
<a>minimal subframe deferred-fetch quota</a> .
7013
7120
</ol>
7014
7121
</ol>
@@ -7052,7 +7159,7 @@ quota to <code>https://frame.example.com</code>, for example by serving the foll
7052
7159
<p> To <dfn export>reserve deferred-fetch quota</dfn> for a <a>navigable container</a>
7053
7160
<var> container</var> given an <a for=/>origin</a> <var> originToNavigateTo</var> :
7054
7161
7055
- <p class=note> This is called when the container document and the document that initiated the
7162
+ <p class=note> This is called when <var> container</var> and the document that initiated the
7056
7163
navigation (the "source document") <a>share deferred-fetch quota</a> . It potentially
7057
7164
reserves either 64kb or 8kb of quota for the frame, if it doesn't <a>share deferred-fetch quota</a>
7058
7165
with its parent and the permissions policy allow. It is not observable to the cotnainer document
@@ -7063,7 +7170,7 @@ shared.
7063
7170
7064
7171
<ol>
7065
7172
<li><p> If the <a data-lt="define an inherited policy for feature in container">inherited policy</a>
7066
- for {{PermissionPolicy /"deferred-fetch"}} , <var> container</var> and <var> originToNavigateTo</var>
7173
+ for {{PermissionsPolicy /"deferred-fetch"}} , <var> container</var> and <var> originToNavigateTo</var>
7067
7174
is <code> Enabled</code> , and the <a>available deferred-fetch quota</a> for
7068
7175
<var> container</var> 's <a>container document</a> is equal or greater than
7069
7176
<a>optional subframe deferred-fetch quota</a> , then set <var> container</var> 's
@@ -7072,7 +7179,7 @@ shared.
7072
7179
<li>
7073
7180
<p> Otherwise, if the
7074
7181
<a data-lt="define an inherited policy for feature in container">inherited policy</a> for
7075
- {{PermissionPolicy /"deferred-fetch-minimal"}} , <var> container</var> and
7182
+ {{PermissionsPolicy /"deferred-fetch-minimal"}} , <var> container</var> and
7076
7183
<var> originToNavigateTo</var> is <code> Enabled</code> , and <var> container</var> 's
7077
7184
<a>node document</a> and <var> container</var> 's <a>node navigable</a>' s
7078
7185
<a for=navigable>top-level traversable</a> 's <a>active document</a>
0 commit comments