From 10dabd090334dea3ba734a7a3aaf5d132eb67e47 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 6 Aug 2020 04:59:20 -0400 Subject: [PATCH] Update environment settings object creation (#1527) Part of https://github.com/whatwg/fetch/issues/1062. Also sets the new-ish fields on environments. --- docs/index.bs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/index.bs b/docs/index.bs index efebb62c..991e797b 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -25,6 +25,7 @@ Markup Shorthands: css no, markdown yes spec: html; type: dfn; text: task queues; for: / type: element; text: link + type: dfn; text: event loop; for: / spec: dom; type: interface; text: Document @@ -37,7 +38,8 @@ spec: fetch; text: ReadableStream spec: infra; type: dfn; - text: list; + text: list + text: queue for: set; text: append for: list; text: append spec: webidl; @@ -160,8 +162,6 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe A script resource has an associated has ever been evaluated flag. It is initially unset. - A script resource has an associated HTTPS state (an HTTPS state value). It is initially "none". - A script resource has an associated referrer policy (a [=/referrer policy=]). It is initially the empty string. A [=/service worker=] has an associated embedder policy (an [=/embedder policy=]). @@ -2581,7 +2581,6 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe 1. If |job|'s job type is *update*, and |newestWorker| is not null and its [=service worker/script url=] does not [=url/equal=] |job|'s [=job/script url=], then: 1. Invoke [=Reject Job Promise=] with |job| and `TypeError`. 1. Invoke Finish Job with |job| and abort these steps. - 1. Let |httpsState| be "none". 1. Let |referrerPolicy| be the empty string. 1. Let |embedder policy| be null. 1. Let |hasUpdatedResources| be false. @@ -2621,7 +2620,6 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe Note: See the definition of the [=Service-Worker-Allowed=] header in Appendix B: Extended HTTP headers. - 1. Set |httpsState| to |response|'s [=response/HTTPS state=]. 1. Set |referrerPolicy| to the result of parse a referrer policy from a Referrer-Policy header of |response|. 1. Set |embedder policy| to the result of [=obtain an embedder policy|obtaining an embedder policy=] from |response|. 1. If |serviceWorkerAllowed| is failure, then: @@ -2690,7 +2688,6 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe 1. Let |worker| be a new [=/service worker=]. 1. Set |worker|'s [=service worker/script url=] to |job|'s [=job/script url=], |worker|'s [=script resource=] to |script|, |worker|'s [=service worker/type=] to |job|'s [=worker type=], and |worker|'s [=script resource map=] to |updatedResourceMap|. 1. Append |url| to |worker|'s [=set of used scripts=]. - 1. Set |worker|'s script resource's HTTPS state to |httpsState|. 1. Set |worker|'s script resource's [=script resource/referrer policy=] to |referrerPolicy|. 1. Assert: |embedder policy| is not null. 1. Set |worker|'s [=service worker/embedder policy=] to |embedder policy|. @@ -2886,16 +2883,13 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe :: Return |serviceWorker|'s [=service worker/script url=]. : The [=environment settings object/origin=] :: Return its registering [=/service worker client=]'s [=environment settings object/origin=]. - : The [=environment settings object/HTTPS state=] - :: Return |workerGlobalScope|'s [=WorkerGlobalScope/HTTPS state=]. : The [=environment settings object/referrer policy=] :: Return |workerGlobalScope|'s [=WorkerGlobalScope/referrer policy=]. : The [=environment settings object/embedder policy=] :: Return |workerGlobalScope|'s [=WorkerGlobalScope/embedder policy=]. - 1. Set |settingsObject|'s [=environment/id=] to a new unique opaque string, its [=creation URL=] to |serviceWorker|'s [=service worker/script url=], its [=environment/target browsing context=] to null, and its [=active service worker=] to null. + 1. Set |settingsObject|'s [=environment/id=] to a new unique opaque string, [=creation URL=] to |serviceWorker|'s [=service worker/script url=], [=environment/top-level creation URL=] to null, [=environment/top-level origin=] to an [=implementation-defined=] value, [=environment/target browsing context=] to null, and [=active service worker=] to null. 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/url=] to |serviceWorker|'s [=service worker/script url=]. - 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/HTTPS state=] to |serviceWorker|'s script resource's HTTPS state. 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/referrer policy=] to |serviceWorker|'s script resource's [=script resource/referrer policy=]. 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/embedder policy=] to |serviceWorker|'s [=service worker/embedder policy=]. 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/type=] to |serviceWorker|'s [=service worker/type=].