From ca5b762bc42b2cc55982e78b3780fa928d4dea70 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Fri, 7 Apr 2017 15:36:41 +0100 Subject: [PATCH 1/6] usecache to updateviacache This is part of https://github.com/w3c/ServiceWorker/issues/1104 --- source | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/source b/source index 8fcd43e3fca..3dfb9f6f690 100644 --- a/source +++ b/source @@ -3791,6 +3791,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • ServiceWorkerContainer interface
  • ServiceWorkerGlobalScope interface
  • use cache
  • +
  • update via cache mode
  • @@ -12907,7 +12908,7 @@ interface HTMLBaseElement : HTMLElement {
    sizes
    as
    scope
    -
    usecache
    +
    updateviacache
    workertype
    color
    Also, the title attribute has special semantics on this element.
    @@ -12929,7 +12930,7 @@ interface HTMLLinkElement : HTMLElement { [CEReactions] attribute DOMString referrerPolicy; [CEReactions] attribute USVString scope; [CEReactions] attribute WorkerType workerType; - [CEReactions] attribute boolean useCache; + [CEReactions] attribute boolean updateViaCache; }; HTMLLinkElement implements LinkStyle; @@ -13136,11 +13137,11 @@ interface HTMLLinkElement : HTMLElement { specified on link elements that do not have a rel attribute that contains the serviceworker keyword.

    -

    The usecache attribute is a boolean - attribute which sets use cache to true for a service worker - registration. The attribute must not be specified on link elements that do not - have a rel attribute that contains the serviceworker keyword.

    +

    The updateviacache attribute is an + enumerated attribute that specifies the update via cache mode for a + service worker registration. The attribute must not be specified on link + elements that do not have a rel attribute that contains the + serviceworker keyword.

    The workertype attribute is an enumerated attribute that specifies the service worker type for a @@ -13200,8 +13201,9 @@ interface HTMLLinkElement : HTMLElement {

    The relList IDL attribute must reflect the rel content attribute.

    -

    The useCache IDL attribute must - reflect the usecache content attribute.

    +

    The updateViaCache IDL attribute must + reflect the updateviacache content + attribute.

    The workerType IDL attribute must reflect the workertype content @@ -24070,13 +24072,14 @@ interface HTMLHyperlinkElementUtils { link elements. This keyword creates an external resource link that is used to declare a service worker registration and its script url, scope url, type, - and use cache setting.

    + and update via cache mode.

    User agents must implement the processing model for link-element serviceworker links described in Service Workers, using the href, scope, workertype, and - usecache attributes.

    + updateviacache attributes. +

    Link type "stylesheet"
    @@ -118492,10 +118495,10 @@ interface External { Whether the type attribute and the Content-Type value need to match for the resource to be used Boolean attribute - usecache - link - Whether to set use cache to true for a service worker registration (for rel="serviceworker") - Boolean attribute + updateviacache + link + update via cache mode for a service worker registration (for rel="serviceworker") + "imports"; "all"; "never" usemap img; From c35a7b5f40078f327ada8eb02abe27543d9c901b Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Mon, 10 Apr 2017 17:23:24 +0100 Subject: [PATCH 2/6] Corrections following feedback --- source | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source b/source index 3dfb9f6f690..e9462d3f3c4 100644 --- a/source +++ b/source @@ -3792,6 +3792,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • ServiceWorkerGlobalScope interface
  • use cache
  • update via cache mode
  • +
  • ServiceWorkerUpdateViaCache enumeration
  • @@ -12930,7 +12931,7 @@ interface HTMLLinkElement : HTMLElement { [CEReactions] attribute DOMString referrerPolicy; [CEReactions] attribute USVString scope; [CEReactions] attribute WorkerType workerType; - [CEReactions] attribute boolean updateViaCache; + [CEReactions] attribute ServiceWorkerUpdateViaCache updateViaCache; }; HTMLLinkElement implements LinkStyle; @@ -13139,9 +13140,12 @@ interface HTMLLinkElement : HTMLElement {

    The updateviacache attribute is an enumerated attribute that specifies the update via cache mode for a - service worker registration. The attribute must not be specified on link - elements that do not have a rel attribute that contains the - serviceworker keyword.

    + service worker registration. The attribute's keywords are + "imports", "all", and "never, + which map to the respective states imports, all, and never. The missing + value default is the imports state. The attribute must not be specified on + link elements that do not have a rel attribute + that contains the serviceworker keyword.

    The workertype attribute is an enumerated attribute that specifies the service worker type for a From 055ff1b9cb258009eb0849ba2e96fe22fc9d0546 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Tue, 6 Jun 2017 14:02:49 +0100 Subject: [PATCH 3/6] Making attribute case-insensitive --- source | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/source b/source index e9462d3f3c4..91683921dd0 100644 --- a/source +++ b/source @@ -12931,7 +12931,7 @@ interface HTMLLinkElement : HTMLElement { [CEReactions] attribute DOMString referrerPolicy; [CEReactions] attribute USVString scope; [CEReactions] attribute WorkerType workerType; - [CEReactions] attribute ServiceWorkerUpdateViaCache updateViaCache; + [CEReactions] attribute DOMString updateViaCache; }; HTMLLinkElement implements LinkStyle; @@ -13138,14 +13138,13 @@ interface HTMLLinkElement : HTMLElement { specified on link elements that do not have a rel attribute that contains the serviceworker keyword.

    -

    The updateviacache attribute is an - enumerated attribute that specifies the update via cache mode for a - service worker registration. The attribute's keywords are - "imports", "all", and "never, - which map to the respective states imports, all, and never. The missing - value default is the imports state. The attribute must not be specified on - link elements that do not have a rel attribute - that contains the serviceworker keyword.

    +

    The updateviacache attribute + specifies the update via cache mode for a service worker registration. + It is an enumerated attribute. Each update via cache mode is a keyword + for this attribute, mapping to a state of the same name. The missing value default is + the imports state. The attribute must not be specified on link elements that + do not have a rel attribute that contains the + serviceworker keyword.

    The workertype attribute is an enumerated attribute that specifies the service worker type for a @@ -13211,7 +13210,7 @@ interface HTMLLinkElement : HTMLElement {

    The workerType IDL attribute must reflect the workertype content - attribute.

    + attribute, limited to only known values.

    Processing the media attribute
    From 01db2b2d7aef1fa2684d5bcc64ce134b82d022e2 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Tue, 6 Jun 2017 14:06:21 +0100 Subject: [PATCH 4/6] Removing reference to idl enum --- source | 1 - 1 file changed, 1 deletion(-) diff --git a/source b/source index 91683921dd0..096abc400fe 100644 --- a/source +++ b/source @@ -3792,7 +3792,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • ServiceWorkerGlobalScope interface
  • use cache
  • update via cache mode
  • -
  • ServiceWorkerUpdateViaCache enumeration
  • From b399212029027ba32dc4be6520e08453d99597c6 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Tue, 6 Jun 2017 14:33:28 +0100 Subject: [PATCH 5/6] Fixing copy paste error & removing cross-spec duplication --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 096abc400fe..7c5bb66546e 100644 --- a/source +++ b/source @@ -13205,11 +13205,11 @@ interface HTMLLinkElement : HTMLElement {

    The updateViaCache IDL attribute must reflect the updateviacache content - attribute.

    + attribute, limited to only known values.

    The workerType IDL attribute must reflect the workertype content - attribute, limited to only known values.

    + attribute.

    Processing the media attribute
    @@ -118500,7 +118500,7 @@ interface External { updateviacache link update via cache mode for a service worker registration (for rel="serviceworker") - "imports"; "all"; "never" + Update via cache mode usemap img; From 9781403291742e494f492e056126f73839b2de1a Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Tue, 6 Jun 2017 10:06:10 -0400 Subject: [PATCH 6/6] Capitalization tweak --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 7c5bb66546e..2591c5a8a3c 100644 --- a/source +++ b/source @@ -118499,7 +118499,7 @@ interface External { updateviacache link - update via cache mode for a service worker registration (for rel="serviceworker") + Update via cache mode for a service worker registration (for rel="serviceworker") Update via cache mode usemap