From ddf95c39a41bd532c2672780e4ba8df0ebf8b41d Mon Sep 17 00:00:00 2001
From: Jungkee Song
Date: Thu, 1 Dec 2016 20:47:53 +0900
Subject: [PATCH] Fix autolinks to job's fields
---
docs/index.bs | 42 ++++++++++----------
docs/index.html | 98 ++++++++++++++++++++++++----------------------
docs/v1/index.bs | 42 ++++++++++----------
docs/v1/index.html | 98 ++++++++++++++++++++++++----------------------
4 files changed, 144 insertions(+), 136 deletions(-)
diff --git a/docs/index.bs b/docs/index.bs
index 516fd9d3..f033f7a4 100644
--- a/docs/index.bs
+++ b/docs/index.bs
@@ -2252,10 +2252,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
Two jobs are equivalent when their job type is the same and:
- * For *register* and *update* jobs, both their [=service worker registration/scope url=] and the [=service worker/script url=] are the same.
- * For *unregister* jobs, their [=service worker registration/scope url=] is the same.
+ * For *register* and *update* jobs, both their [=job/scope url=] and the [=job/script url=] are the same.
+ * For *unregister* jobs, their [=job/scope url=] is the same.
- A job queue is a thread safe queue used to synchronize the set of concurrent jobs. The job queue contains jobs as its elements. The job queue *should* satisfy the general properties of FIFO queue. A user agent *must* maintain a separate job queue for each [=/service worker registration=] keyed by its [=service worker registration/scope url=]. A job queue is initially empty. Unless stated otherwise, the job queue referenced from the algorithm steps is a job queue for the job's [=service worker registration/scope url=].
+ A job queue is a thread safe queue used to synchronize the set of concurrent jobs. The job queue contains jobs as its elements. The job queue *should* satisfy the general properties of FIFO queue. A user agent *must* maintain a separate job queue for each [=/service worker registration=] keyed by its [=service worker registration/scope url=]. A job queue is initially empty. Unless stated otherwise, the job queue referenced from the algorithm steps is a job queue for the job's [=job/scope url=].
Create Job
@@ -2392,24 +2392,24 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
: Output
:: none
- 1. If the result of running potentially trustworthy origin with the [=environment settings object/origin=] of |job|'s [=service worker/script url=] as the argument is Not Trusted, then:
+ 1. If the result of running potentially trustworthy origin with the [=environment settings object/origin=] of |job|'s [=job/script url=] as the argument is Not Trusted, then:
1. Invoke Reject Job Promise with |job| and a "{{SecurityError}}" exception.
1. Invoke Finish Job with |job| and abort these steps.
- 1. If the [=environment settings object/origin=] of |job|'s [=service worker/script url=] is not |job|'s [=job/referrer=]'s [=environment settings object/origin=], then:
+ 1. If the [=environment settings object/origin=] of |job|'s [=job/script url=] is not |job|'s [=job/referrer=]'s [=environment settings object/origin=], then:
1. Invoke Reject Job Promise with |job| and a "{{SecurityError}}" exception.
1. Invoke Finish Job with |job| and abort these steps.
- 1. If the [=environment settings object/origin=] of |job|'s [=service worker registration/scope url=] is not |job|'s [=job/referrer=]'s [=environment settings object/origin=], then:
+ 1. If the [=environment settings object/origin=] of |job|'s [=job/scope url=] is not |job|'s [=job/referrer=]'s [=environment settings object/origin=], then:
1. Invoke Reject Job Promise with |job| and a "{{SecurityError}}" exception.
1. Invoke Finish Job with |job| and abort these steps.
- 1. Let |registration| be the result of running the Get Registration algorithm passing |job|'s [=service worker registration/scope url=] as the argument.
+ 1. Let |registration| be the result of running the Get Registration algorithm passing |job|'s [=job/scope url=] as the argument.
1. If |registration| is not null, then:
1. If |registration|'s uninstalling flag is set, unset it.
1. Let |newestWorker| be the result of running the Get Newest Worker algorithm passing |registration| as the argument.
- 1. If |newestWorker| is not null and |job|'s [=service worker/script url=] [=url/equals=] |newestWorker|'s [=service worker/script url=] with the *exclude fragments flag* set, then:
- 1. Invoke Resolve Job Promise with |job| and the {{ServiceWorkerRegistration}} object which represents |registration|.
- 1. Invoke Finish Job with |job| and abort these steps.
+ 1. If |newestWorker| is not null and |job|'s [=job/script url=] [=url/equals=] |newestWorker|'s [=service worker/script url=] with the *exclude fragments flag* set, then:
+ 1. Invoke Resolve Job Promise with |job| and the {{ServiceWorkerRegistration}} object which represents |registration|.
+ 1. Invoke Finish Job with |job| and abort these steps.
1. Else:
- 1. Invoke Set Registration algorithm passing |job|'s [=service worker registration/scope url=] as its argument.
+ 1. Invoke Set Registration algorithm passing |job|'s [=job/scope url=] as its argument.
1. Invoke Update algorithm passing |job| as the argument.
@@ -2421,12 +2421,12 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
: Output
:: none
- 1. Let |registration| be the result of running the Get Registration algorithm passing |job|'s [=service worker registration/scope url=] as the argument.
+ 1. Let |registration| be the result of running the Get Registration algorithm passing |job|'s [=job/scope url=] as the argument.
1. If |registration| is null or |registration|'s uninstalling flag is set, then:
1. Invoke Reject Job Promise with |job| and a TypeError.
1. Invoke Finish Job with |job| and abort these steps.
1. Let |newestWorker| be the result of running Get Newest Worker algorithm passing |registration| as the argument.
- 1. If |job|'s job type is *update*, and |newestWorker|'s [=service worker/script url=] does not [=url/equal=] |job|'s [=service worker/script url=] with the *exclude fragments flag* set, then:
+ 1. If |job|'s job type is *update*, and |newestWorker|'s [=service worker/script url=] does not [=url/equal=] |job|'s [=job/script url=] with the *exclude fragments flag* set, then:
1. Invoke Reject Job Promise with |job| and a TypeError.
1. Invoke Finish Job with |job| and abort these steps.
1. Let |httpsState| be "none".
@@ -2434,9 +2434,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Switching on |job|'s worker type, run these substeps with the following options:
: "classic"
- :: Fetch a classic worker script given |job|’s serialized [=service worker/script url=], |job|’s [=job/client=], "serviceworker", and the to-be-created environment settings object for this service worker.
+ :: Fetch a classic worker script given |job|’s serialized [=job/script url=], |job|’s [=job/client=], "serviceworker", and the to-be-created environment settings object for this service worker.
: "module"
- :: Fetch a module worker script graph given |job|’s serialized [=service worker/script url=], |job|’s [=job/client=], "serviceworker", "omit", and the to-be-created environment settings object for this service worker.
+ :: Fetch a module worker script graph given |job|’s serialized [=job/script url=], |job|’s [=job/client=], "serviceworker", "omit", and the to-be-created environment settings object for this service worker.
To [=fetching scripts/perform the fetch=] given |request|, run the following steps if the [=fetching scripts/is top-level=] flag is set:
@@ -2465,9 +2465,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |scopeURL| be |registration|'s [=service worker registration/scope url=].
1. Let |maxScopeString| be null.
1. If |serviceWorkerAllowed| is null, then:
- 1. Set |maxScopeString| to "/" concatenated with the strings, except the last string that denotes the script's file name, in |job|'s [=service worker/script url=]'s [=url/path=] (including empty strings), separated from each other by "/".
+ 1. Set |maxScopeString| to "/" concatenated with the strings, except the last string that denotes the script's file name, in |job|'s [=job/script url=]'s [=url/path=] (including empty strings), separated from each other by "/".
1. Else:
- 1. Let |maxScope| be the result of parsing |serviceWorkerAllowed| with |job|'s [=service worker/script url=].
+ 1. Let |maxScope| be the result of parsing |serviceWorkerAllowed| with |job|'s [=job/script url=].
1. Set |maxScopeString| to "/" concatenated with the strings in |maxScope|'s [=url/path=] (including empty strings), separated from each other by "/".
1. Let |scopeString| be "/" concatenated with the strings in |scopeURL|'s [=url/path=] (including empty strings), separated from each other by "/".
1. If |scopeString| starts with |maxScopeString|, do nothing.
@@ -2491,13 +2491,13 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
Else, continue the rest of these steps after the algorithm's asynchronous completion, with |script| being the asynchronous completion value.
- 1. If |newestWorker| is not null, |newestWorker|'s [=service worker/script url=] [=url/equals=] |job|'s [=service worker/script url=] with the *exclude fragments flag* set, and |script| is a byte-for-byte match with |newestWorker|'s script resource, then:
+ 1. If |newestWorker| is not null, |newestWorker|'s [=service worker/script url=] [=url/equals=] |job|'s [=job/script url=] with the *exclude fragments flag* set, and |script| is a byte-for-byte match with |newestWorker|'s script resource, then:
1. Invoke Resolve Job Promise with |job| and the {{ServiceWorkerRegistration}} object which represents |registration|.
1. Invoke Finish Job with |job| and abort these steps.
1. Else:
1. Let |worker| be a new [=/service worker=].
1. Generate a unique opaque string and set |worker|'s id to the value.
- 1. Set |worker|'s [=service worker/script url=] to |job|'s [=service worker/script url=], |worker|'s script resource to |script|, and |worker|'s type to |job|'s worker type.
+ 1. Set |worker|'s [=service worker/script url=] to |job|'s [=job/script url=], |worker|'s script resource to |script|, and |worker|'s type to |job|'s worker type.
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. Invoke Run Service Worker algorithm with |worker| as the argument.
@@ -2962,10 +2962,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
: Output
:: none
- 1. If the [=environment settings object/origin=] of |job|'s [=service worker registration/scope url=] is not |job|'s [=job/client=]'s [=environment settings object/origin=], then:
+ 1. If the [=environment settings object/origin=] of |job|'s [=job/scope url=] is not |job|'s [=job/client=]'s [=environment settings object/origin=], then:
1. Invoke Reject Job Promise with |job| and a "{{SecurityError}}" exception.
1. Invoke Finish Job with |job| and abort these steps.
- 1. Let |registration| be the result of running Get Registration algorithm passing |job|'s [=service worker registration/scope url=] as the argument.
+ 1. Let |registration| be the result of running Get Registration algorithm passing |job|'s [=job/scope url=] as the argument.
1. If |registration| is null, then:
1. Invoke Resolve Job Promise with |job| and false.
1. Invoke Finish Job with |job| and abort these steps.
diff --git a/docs/index.html b/docs/index.html
index 2e917fea..6da3221c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -4380,11 +4380,11 @@
Appendix A: Al
Two jobs are equivalent when their job type is the same and:
A job queue is a thread safe queue used to synchronize the set of concurrent jobs. The job queue contains jobs as its elements. The job queueshould satisfy the general properties of FIFO queue. A user agent must maintain a separate job queue for each service worker registration keyed by its scope url. A job queue is initially empty. Unless stated otherwise, the job queue referenced from the algorithm steps is a job queue for the job’s scope url.
+
A job queue is a thread safe queue used to synchronize the set of concurrent jobs. The job queue contains jobs as its elements. The job queueshould satisfy the general properties of FIFO queue. A user agent must maintain a separate job queue for each service worker registration keyed by its scope url. A job queue is initially empty. Unless stated otherwise, the job queue referenced from the algorithm steps is a job queue for the job’s scope url.
Set maxScopeString to "/" concatenated with the strings, except the last string that denotes the script’s file name, in job’s script url's path (including empty strings), separated from each other by "/".
+
Set maxScopeString to "/" concatenated with the strings, except the last string that denotes the script’s file name, in job’s script url's path (including empty strings), separated from each other by "/".
Else:
-
Let maxScope be the result of parsingserviceWorkerAllowed with job’s script url.
+
Let maxScope be the result of parsingserviceWorkerAllowed with job’s script url.
Set maxScopeString to "/" concatenated with the strings in maxScope’s path (including empty strings), separated from each other by "/".
@@ -4803,7 +4803,7 @@
Else, continue the rest of these steps after the algorithm’s asynchronous completion, with script being the asynchronous completion value.
-
If newestWorker is not null, newestWorker’s script urlequalsjob’s script url with the exclude fragments flag set, and script is a byte-for-byte match with newestWorker’s script resource, then:
+
If newestWorker is not null, newestWorker’s script urlequalsjob’s script url with the exclude fragments flag set, and script is a byte-for-byte match with newestWorker’s script resource, then:
Indicates the user agent will override the path restriction, which limits the maximum allowed scope url that the script can control, to the given value.
+
Indicates the user agent will override the path restriction, which limits the maximum allowed scope url that the script can control, to the given value.
Note: The value is a URL. If a relative URL is given, it is parsed against the script’s URL.