Skip to content

Commit 947d892

Browse files
authored
Fix references to html after navigation and session history rewrite (#580)
This change fixes broken references to html, which were mostly a result of the navigation and session history rewrite. In particular, this change: - replaces browsing contexts with navigables, - drops the sandbox initialization part for documents, since it is now included in html, - rewords the part on plugins, since the html no longer defines plugin documents, but only considers pdfs.
1 parent 3aeebb3 commit 947d892

File tree

1 file changed

+37
-39
lines changed

1 file changed

+37
-39
lines changed

index.bs

+37-39
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ At Risk: The [[#is-element-nonceable]] algorithm.
2525
spec:dom; type:interface; text:Document
2626
spec:html
2727
type: dfn
28-
text: plugin document
2928
text: fallback base url
3029
text: duplicate-attribute
3130
type: element
@@ -123,7 +122,6 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/
123122
for: script
124123
text: "parser-inserted"
125124
text: origin; url: concept-origin
126-
text: browsing context; url: browsing-context
127125
text: content security policy state; url: attr-meta-http-equiv-content-security-policy
128126
text: create and initialize a new document object; url: initialise-the-document-object
129127
text: initializing a new Document object; url: initialise-the-document-object
@@ -625,7 +623,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
625623

626624
6. A <dfn for="directive" export>navigation response check</dfn>, which takes a
627625
<a for="/">request</a>, a navigation type string ("`form-submission`" or "`other`"),
628-
a <a>response</a>, a <a>browsing context</a>, a check type string ("`source`"
626+
a <a>response</a>, a <a>navigable</a>, a check type string ("`source`"
629627
or "`response`"), and a <a for="/">policy</a> as arguments, and is executed during
630628
[[#should-block-navigation-response]]. It returns "`Allowed`" unless otherwise specified.
631629

@@ -1145,15 +1143,18 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
11451143
base URL</a> algorithm to ensure that the <{base/href}> attribute's value
11461144
is valid.
11471145

1148-
10. [[#should-block-navigation-request]] is called during the <a>process a
1149-
navigate fetch</a> algorithm, and [[#should-block-navigation-response]]
1150-
is called during the <a>process a navigate response</a> algorithm to
1151-
apply directive's navigation checks, as well as inline checks for
1146+
10. [[#should-block-navigation-request]] is called during the <a spec=html>create
1147+
navigation params by fetching</a> algorithm, and [[#should-block-navigation-response]]
1148+
is called during the <a spec=html>attempt to populate the history entry's document</a>
1149+
algorithm to apply directive's navigation checks, as well as inline checks for
11521150
navigations to `javascript:` URLs.
11531151

11541152
11. [[#run-global-object-csp-initialization]] is called during the <a>run a worker</a>
11551153
algorithm.
11561154

1155+
12. The <a>sandbox</a> directive is used to populate the <a spec=html>CSP-derived
1156+
sandboxing flags</a>.
1157+
11571158
<h4 id="run-document-csp-initialization" algorithm dfn export>
11581159
Run `CSP` initialization for a `Document`
11591160
</h4>
@@ -1310,7 +1311,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
13101311

13111312
Given a <a for="/">request</a> (|navigation request|), a <a>response</a> |navigation
13121313
response|, a [=/CSP list=] |response CSP list|, a string (|type|, either
1313-
"`form-submission`" or "`other`"), and a <a>browsing context</a> |target|, this algorithm
1314+
"`form-submission`" or "`other`"), and a <a>navigable</a> |target|, this algorithm
13141315
returns "`Blocked`" if the active policy blocks the navigation, and "`Allowed`"
13151316
otherwise:
13161317

@@ -1947,8 +1948,8 @@ this algorithm returns normally if compilation is allowed, and throws a
19471948

19481949
<h4 id="directive-child-src">`child-src`</h4>
19491950

1950-
The <dfn export>`child-src`</dfn> directive governs the creation of <a>nested browsing
1951-
contexts</a> (e.g. <{iframe}> and <{frame}> navigations) and Worker execution
1951+
The <dfn export>`child-src`</dfn> directive governs the creation of <a>child
1952+
navigables</a> (e.g. <{iframe}> and <{frame}> navigations) and Worker execution
19521953
contexts. The syntax for the directive's name and value is described by the
19531954
following ABNF:
19541955

@@ -2339,7 +2340,7 @@ this algorithm returns normally if compilation is allowed, and throws a
23392340
<h4 id="directive-frame-src">`frame-src`</h4>
23402341

23412342
The <dfn export>frame-src</dfn> directive restricts the URLs which may be loaded into
2342-
<a>nested browsing contexts</a>. The syntax for the directive's name and value
2343+
<a>child navigables</a>. The syntax for the directive's name and value
23432344
is described by the following ABNF:
23442345

23452346
<pre>
@@ -2646,16 +2647,16 @@ this algorithm returns normally if compilation is allowed, and throws a
26462647

26472648
Note: The `object-src` directive acts upon any request made on behalf of
26482649
an <{object}> or <{embed}> element. This includes requests
2649-
which would populate the <a>nested browsing context</a> generated by the
2650+
which would populate the <a>child navigable</a> generated by the
26502651
former two (also including navigations). This is true even when the data is
26512652
semantically equivalent to content which would otherwise be restricted by
26522653
another directive, such as an <{object}> element with a `text/html` MIME
26532654
type.
26542655

2655-
Note: When a plugin resource is navigated to directly (that is, as a <a>plugin document</a> in the
2656-
<a>top-level browsing context</a> or a <a>nested browsing context</a>, and not as an embedded
2656+
Note: When a plugin resource is navigated to directly (that is, as a <a spec=html>plugin</a>
2657+
inside a <a>navigable</a>, and not as an embedded
26572658
subresource via <{embed}> or <{object}>), any <a for="/">policy</a> delivered along
2658-
with that resource will be applied to the <a>plugin document</a>. This means, for instance, that
2659+
with that resource will be applied to the resulting <a>document</a>. This means, for instance, that
26592660
developers can prevent the execution of arbitrary resources as plugin content by delivering the
26602661
policy `object-src 'none'` along with a response. Given plugins' power (and the
26612662
sometimes-interesting security model presented by Flash and others), this could mitigate the risk
@@ -3467,35 +3468,32 @@ this algorithm returns normally if compilation is allowed, and throws a
34673468
</h5>
34683469

34693470
This directive's <a for="directive">initialization</a> algorithm is
3470-
responsible for adjusting a {{Document}}'s <a>forced sandboxing flag set</a>
3471-
and for checking whether a worker is allowed to run according to the <a>`sandbox`</a>
3472-
values present in its policies as follows:
3471+
responsible for checking whether a worker is allowed to run according
3472+
to the <a>`sandbox`</a> values present in its policies as follows:
3473+
3474+
Note: The <a>sandbox</a> directive is also responsible for adjusting a
3475+
{{Document}}'s <a for=Document>active sandboxing flag set</a> via the
3476+
<a spec=html>CSP-derived sandboxing flags</a>.
34733477

34743478
Given a {{Document}} or <a for="/">global object</a> (|context|) and a <a for="/">policy</a>
34753479
(|policy|):
34763480

34773481
1. If |policy|'s <a for="policy">disposition</a> is not "`enforce`", or
3478-
|context| is a {{WorkletGlobalScope}}, then abort this algorithm.
3482+
|context| is not a {{WorkerGlobalScope}}, then abort this algorithm.
34793483

34803484
2. Let |sandboxing flag set| be a new [=/sandboxing flag set=].
34813485

34823486
3. <a>Parse a sandboxing directive</a> using this directive's <a
34833487
for="directive">value</a> as the input, and |sandboxing flag set| as the output.
34843488

3485-
4. If |context| is a {{WorkerGlobalScope}}:
3486-
3487-
1. If |sandboxing flag set| contains either the <a>sandboxed scripts browsing
3488-
context flag</a> or the <a>sandboxed origin browsing context flag</a> flags,
3489-
return "`Blocked`".
3489+
4. If |sandboxing flag set| contains either the <a>sandboxed scripts browsing context
3490+
flag</a> or the <a>sandboxed origin browsing context flag</a> flags,
3491+
return "`Blocked`".
34903492

3491-
Note: This will need to change if we allow Workers to be sandboxed into unique
3492-
origins, which seems like a pretty reasonable thing to do.
3493+
Note: This will need to change if we allow Workers to be sandboxed into unique
3494+
origins, which seems like a pretty reasonable thing to do.
34933495

3494-
5. If |context| is a {{Document}}:
3495-
3496-
1. Set |context|'s <a>forced sandboxing flag set</a> to |sandboxing flag set|.
3497-
3498-
6. Return "`Allowed`".
3496+
5. Return "`Allowed`".
34993497

35003498
<h3 id="directives-navigation">
35013499
Navigation Directives
@@ -3564,7 +3562,7 @@ this algorithm returns normally if compilation is allowed, and throws a
35643562

35653563
Given a <a for="/">request</a> (|request|), a string |navigation type|
35663564
("`form-submission`" or "`other`"), a
3567-
<a>response</a> (|navigation response|) a <a>browsing context</a> (|target|),
3565+
<a>response</a> (|navigation response|) a <a>navigable</a> (|target|),
35683566
a string |check type| ("`source`" or "`response`"), and a
35693567
<a for="/">policy</a> (|policy|) this algorithm returns "`Blocked`" if one or
35703568
more of the ancestors of |target| violate the `frame-ancestors` directive
@@ -3581,16 +3579,16 @@ this algorithm returns normally if compilation is allowed, and throws a
35813579
3. If |check type| is "`source`", return "`Allowed`".
35823580

35833581
Note: The 'frame-ancestors' <a>directive</a> is relevant only to the
3584-
|target| <a>browsing context</a> and it has no impact on the |request|'s
3582+
|target| <a>navigable</a> and it has no impact on the |request|'s
35853583
context.
35863584

3587-
4. If |target| is not a <a>nested browsing context</a>, return "`Allowed`".
3585+
4. If |target| is not a <a>child navigable</a>, return "`Allowed`".
35883586

35893587
5. Let |current| be |target|.
35903588

3591-
6. While |current| is a <a>nested browsing context</a>:
3589+
6. While |current| is a <a>child navigable</a>:
35923590

3593-
1. Let |document| be |current|'s [=browsing context/container document=].
3591+
1. Let |document| be |current|'s [=navigable/container document=].
35943592

35953593
2. Let |origin| be the result of executing the <a>URL parser</a> on the
35963594
<a lt="ASCII serialization of an origin">ASCII serialization</a>
@@ -3600,7 +3598,7 @@ this algorithm returns normally if compilation is allowed, and throws a
36003598
executed upon |origin|, this directive's <a for="directive">value</a>,
36013599
|policy|'s [=policy/self-origin=], and `0`, return "`Blocked`".
36023600

3603-
4. Set |current| to |document|'s <a>browsing context</a>.
3601+
4. Set |current| to |document|'s <a>node navigable</a>.
36043602

36053603
7. Return "`Allowed`".
36063604
</ol>
@@ -4712,7 +4710,7 @@ this algorithm returns normally if compilation is allowed, and throws a
47124710
</h3>
47134711

47144712
Documents loaded from <a>local schemes</a> will inherit a copy of the
4715-
policies in the <a>source browsing context</a>. The goal is to ensure that a page can't
4713+
policies in the source document. The goal is to ensure that a page can't
47164714
bypass its policy by embedding a frame or opening a new window containing
47174715
content that is entirely under its control (`srcdoc` documents, `blob:` or `data:`
47184716
URLs, `about:blank` documents that can be manipulated via `document.write()`, etc).
@@ -4730,7 +4728,7 @@ this algorithm returns normally if compilation is allowed, and throws a
47304728
means that the new {{Document}}'s <a for="global object">CSP list</a> is a
47314729
snapshot of the relevant policies at its creation time. Modifications in the
47324730
<a for="global object">CSP list</a> of the new {{Document}} won't affect the
4733-
<a>source browsing context</a>'s <a for="global object">CSP list</a> or vice-versa.
4731+
source {{Document}}'s <a for="global object">CSP list</a> or vice-versa.
47344732

47354733
<div class="example">
47364734
In the example below the image inside the iframe will not load because it is

0 commit comments

Comments
 (0)