Skip to content

Commit 3eeed87

Browse files
committed
Fix references to html after navigation and session history rewrite
1 parent 3aeebb3 commit 3eeed87

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

index.bs

+40-37
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ spec:html
2828
text: plugin document
2929
text: fallback base url
3030
text: duplicate-attribute
31+
text: create navigation params by fetching
32+
text: attempt to populate the history entry's document
33+
text: plugin
3134
type: element
3235
text: a
3336
text: link
@@ -123,11 +126,12 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/
123126
for: script
124127
text: "parser-inserted"
125128
text: origin; url: concept-origin
126-
text: browsing context; url: browsing-context
127129
text: content security policy state; url: attr-meta-http-equiv-content-security-policy
128130
text: create and initialize a new document object; url: initialise-the-document-object
129131
text: initializing a new Document object; url: initialise-the-document-object
130132
text: prepare the script element; url: prepare-the-script-element
133+
text: container document; for: navigable; url: nav-container-document
134+
text: CSP-derived sandboxing flags; url: csp-derived-sandboxing-flags
131135

132136
spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
133137
type: grammar
@@ -625,7 +629,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
625629

626630
6. A <dfn for="directive" export>navigation response check</dfn>, which takes a
627631
<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`"
632+
a <a>response</a>, a <a>navigable</a>, a check type string ("`source`"
629633
or "`response`"), and a <a for="/">policy</a> as arguments, and is executed during
630634
[[#should-block-navigation-response]]. It returns "`Allowed`" unless otherwise specified.
631635

@@ -1145,15 +1149,17 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
11451149
base URL</a> algorithm to ensure that the <{base/href}> attribute's value
11461150
is valid.
11471151

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
1152+
10. [[#should-block-navigation-request]] is called during the <a>create navigation params
1153+
by fetching</a> algorithm, and [[#should-block-navigation-response]]
1154+
is called during the <a>attempt to populate the history entry's document</a> algorithm to
11511155
apply directive's navigation checks, as well as inline checks for
11521156
navigations to `javascript:` URLs.
11531157

11541158
11. [[#run-global-object-csp-initialization]] is called during the <a>run a worker</a>
11551159
algorithm.
11561160

1161+
12. The <a>sandbox</a> directive is used to populate the <a>CSP-derived sandboxing flags</a>.
1162+
11571163
<h4 id="run-document-csp-initialization" algorithm dfn export>
11581164
Run `CSP` initialization for a `Document`
11591165
</h4>
@@ -1310,7 +1316,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
13101316

13111317
Given a <a for="/">request</a> (|navigation request|), a <a>response</a> |navigation
13121318
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
1319+
"`form-submission`" or "`other`"), and a <a>navigable</a> |target|, this algorithm
13141320
returns "`Blocked`" if the active policy blocks the navigation, and "`Allowed`"
13151321
otherwise:
13161322

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

19481954
<h4 id="directive-child-src">`child-src`</h4>
19491955

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
1956+
The <dfn export>`child-src`</dfn> directive governs the creation of <a>child
1957+
navigables</a> (e.g. <{iframe}> and <{frame}> navigations) and Worker execution
19521958
contexts. The syntax for the directive's name and value is described by the
19531959
following ABNF:
19541960

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

23412347
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
2348+
<a>child navigables</a>. The syntax for the directive's name and value
23432349
is described by the following ABNF:
23442350

23452351
<pre>
@@ -2646,16 +2652,16 @@ this algorithm returns normally if compilation is allowed, and throws a
26462652

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

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
2661+
Note: When a plugin resource is navigated to directly (that is, as a <a>plugin</a>
2662+
inside a <a>navigable</a>, and not as an embedded
26572663
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
2664+
with that resource will be applied to the resulting <a>document</a>. This means, for instance, that
26592665
developers can prevent the execution of arbitrary resources as plugin content by delivering the
26602666
policy `object-src 'none'` along with a response. Given plugins' power (and the
26612667
sometimes-interesting security model presented by Flash and others), this could mitigate the risk
@@ -3467,35 +3473,32 @@ this algorithm returns normally if compilation is allowed, and throws a
34673473
</h5>
34683474

34693475
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:
3476+
responsible for checking whether a worker is allowed to run according
3477+
to the <a>`sandbox`</a> values present in its policies as follows:
3478+
3479+
Note: The <a>sandbox</a> directive is also responsible for adjusting a
3480+
{{Document}}'s <a for=Document>active sandboxing flag set</a> via the
3481+
<a>CSP-derived sandboxing flags</a>.
34733482

34743483
Given a {{Document}} or <a for="/">global object</a> (|context|) and a <a for="/">policy</a>
34753484
(|policy|):
34763485

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

34803489
2. Let |sandboxing flag set| be a new [=/sandboxing flag set=].
34813490

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

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`".
3494+
4. If |sandboxing flag set| contains either the <a>sandboxed scripts browsing context
3495+
flag</a> or the <a>sandboxed origin browsing context flag</a> flags,
3496+
return "`Blocked`".
34903497

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.
3498+
Note: This will need to change if we allow Workers to be sandboxed into unique
3499+
origins, which seems like a pretty reasonable thing to do.
34933500

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`".
3501+
5. Return "`Allowed`".
34993502

35003503
<h3 id="directives-navigation">
35013504
Navigation Directives
@@ -3564,7 +3567,7 @@ this algorithm returns normally if compilation is allowed, and throws a
35643567

35653568
Given a <a for="/">request</a> (|request|), a string |navigation type|
35663569
("`form-submission`" or "`other`"), a
3567-
<a>response</a> (|navigation response|) a <a>browsing context</a> (|target|),
3570+
<a>response</a> (|navigation response|) a <a>navigable</a> (|target|),
35683571
a string |check type| ("`source`" or "`response`"), and a
35693572
<a for="/">policy</a> (|policy|) this algorithm returns "`Blocked`" if one or
35703573
more of the ancestors of |target| violate the `frame-ancestors` directive
@@ -3581,16 +3584,16 @@ this algorithm returns normally if compilation is allowed, and throws a
35813584
3. If |check type| is "`source`", return "`Allowed`".
35823585

35833586
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
3587+
|target| <a>navigable</a> and it has no impact on the |request|'s
35853588
context.
35863589

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

35893592
5. Let |current| be |target|.
35903593

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

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

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

3603-
4. Set |current| to |document|'s <a>browsing context</a>.
3606+
4. Set |current| to |document|'s <a>navigable</a>.
36043607

36053608
7. Return "`Allowed`".
36063609
</ol>
@@ -4712,7 +4715,7 @@ this algorithm returns normally if compilation is allowed, and throws a
47124715
</h3>
47134716

47144717
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
4718+
policies in the source document. The goal is to ensure that a page can't
47164719
bypass its policy by embedding a frame or opening a new window containing
47174720
content that is entirely under its control (`srcdoc` documents, `blob:` or `data:`
47184721
URLs, `about:blank` documents that can be manipulated via `document.write()`, etc).
@@ -4730,7 +4733,7 @@ this algorithm returns normally if compilation is allowed, and throws a
47304733
means that the new {{Document}}'s <a for="global object">CSP list</a> is a
47314734
snapshot of the relevant policies at its creation time. Modifications in the
47324735
<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.
4736+
source {{Document}}'s <a for="global object">CSP list</a> or vice-versa.
47344737

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

0 commit comments

Comments
 (0)