From 5a1ef0447f579f4eaaa529dd098e8691dcab05dc Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Wed, 2 Nov 2016 13:50:41 +0900 Subject: [PATCH 1/6] Extend environment concept - Add execution ready flag, which is set when the corresponding environment settings object is created and the potential main resource is fetched (in the case of an initial browsing context creation, the main resource fetch doesn't occur and not considered as a condition.) . This flag is mainly used in Service Worker's Client API (i.e. to get a value for client.reserved) - Define the origin algorithm that returns the creation URL's origin . The origin algorithms defined in the environment settings objects override the behavior. . The primary purpose of defining this algorithm is to allow a polymorphic dispatch depending on the type of objects (i.e. to simplify the steps in the call sites.) Related issue: https://github.com/whatwg/html/issues/1992 --- source | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/source b/source index ad70ef70bfc..073cec7cfa8 100644 --- a/source +++ b/source @@ -76515,8 +76515,8 @@ dictionary DragEventInit : MouseEventInit { -
  • Set up a browsing context environment settings object with - realm execution context.

  • +
  • Set up a browsing context environment settings object with realm + execution context, and set settingsObject to the result.

  • Let document be a new Document, marked as an HTML document in quirks mode, whose DragEventInit : MouseEventInit {

  • Implement the sandboxing for document.

  • +
  • Set settingsObject's execution ready flag.

  • +
  • Add document to browsingContext's session history.

  • @@ -81795,6 +81798,9 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
  • Implement the sandboxing for the Document.

  • +
  • Set settingsObject's execution ready flag.

  • +
  • If settingsObject's active service worker is not null, @@ -85800,6 +85806,14 @@ interface NavigatorOnLine { data-x="dfn-control">controls the environment.

    +

    An environment has an execution ready flag, which is initially unset.

    + +

    An environment has an algorithm defined as the origin that returns the environment's creation URL's origin.

    +

    An environment settings object is an environment that additionally specifies algorithms for:

    @@ -96360,6 +96374,9 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {
  • +
  • Set inside settings's execution ready flag.

  • +
  • From 69f75c377d57495758c6d59b0c298cf9804fda65 Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Wed, 2 Nov 2016 16:59:57 +0900 Subject: [PATCH 2/6] Add data-x to origin to resolve multiple definition error --- source | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source b/source index 073cec7cfa8..e9d3da349e5 100644 --- a/source +++ b/source @@ -85809,10 +85809,10 @@ interface NavigatorOnLine {

    An environment has an execution ready flag, which is initially unset.

    -

    An environment has an algorithm defined as the origin that returns the environment's creation URL's origin.

    +

    An environment has an algorithm defined as the origin that + returns the environment's creation + URL's origin.

    An environment settings object is an environment that additionally specifies algorithms for:

    From e1ced39083d42bbe2619e3767ce5efba1f33d6a0 Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Wed, 2 Nov 2016 17:04:31 +0900 Subject: [PATCH 3/6] Add data-dfn-for attribute to execution ready flag --- source | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source b/source index e9d3da349e5..2f8f31a9c23 100644 --- a/source +++ b/source @@ -85807,7 +85807,8 @@ interface NavigatorOnLine {

    An environment has an execution ready flag, which is initially unset.

    + data-export="" data-dfn-for="environment">execution ready flag, which is initially + unset.

    An environment has an algorithm defined as the origin that From ed8576ec98983d0f28ca55343ca1fcb73448e98f Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Fri, 4 Nov 2016 15:43:58 +0900 Subject: [PATCH 4/6] Remove the origin algorithm This removes the environment's origin algorithm definition. The requirement is now covered by Service Workers spec with the service worker client's origin algorithm: https://w3c.github.io/ServiceWorker/#service-worker-client-origin --- source | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source b/source index 2f8f31a9c23..b76fb964b86 100644 --- a/source +++ b/source @@ -85810,11 +85810,6 @@ interface NavigatorOnLine { data-export="" data-dfn-for="environment">execution ready flag, which is initially unset.

    -

    An environment has an algorithm defined as the origin that - returns the environment's creation - URL's origin.

    -

    An environment settings object is an environment that additionally specifies algorithms for:

    From 655c60318e06d0765bea527095a1e5782016f265 Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Mon, 7 Nov 2016 10:51:15 +0900 Subject: [PATCH 5/6] Move execution ready flag into
    --- source | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source b/source index b76fb964b86..1506b6f1963 100644 --- a/source +++ b/source @@ -85804,11 +85804,12 @@ interface NavigatorOnLine { data-dfn-for="environment">active service worker

    Null or a service worker that controls the environment.

    -
    -

    An environment has an execution ready flag, which is initially - unset.

    +
    An execution ready flag
    +

    A flag that indicates whether the environment setup is done. It is initially + unset.

    +

    An environment settings object is an environment that additionally specifies algorithms for:

    From de7dde4bd5554c9d221616dbdef78e57e1afccc4 Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Tue, 8 Nov 2016 12:59:22 +0900 Subject: [PATCH 6/6] Use let for variable introduction --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 1506b6f1963..02a921ea340 100644 --- a/source +++ b/source @@ -76516,7 +76516,7 @@ dictionary DragEventInit : MouseEventInit {
  • Set up a browsing context environment settings object with realm - execution context, and set settingsObject to the result.

  • + execution context, and let settingsObject be the result.

  • Let document be a new Document, marked as an HTML document in quirks mode, whose