From 1ba8b2dcd0b502a41e7a005af8a401a051034a87 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 26 Jun 2018 06:59:20 +0200 Subject: [PATCH 01/19] Define the ACHL cache and ACHL/ACH processing --- source | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/source b/source index d557d6bedb9..c60ef3dfd94 100644 --- a/source +++ b/source @@ -79422,6 +79422,15 @@ interface BarProp { policy.

+
The client-hints list
+
+ +

Return the result of running Retrieve client-hints + list with origin as input.

+ +
+ @@ -82894,6 +82903,26 @@ interface Location { // but see also Document's CSP list given document, response, and request.

+
  • Let callerIsSecureContext be the result of executing Is environment + settings object a secure context? on the Window object's + environment settings object.

  • + +
  • If response's + + Accept-CH header is present, and callerIsSecureContext is true, add each parsed + client hints token to the + client-hints list of the Window object's environment settings object.

    +
  • + +
  • If response's + + Accept-CH-Lifetime header is present, and callerIsSecureContext is true, + call create a new entry with response + 's origin, the parsed max-age, and the client-hints list of the + Window object's environment settings object.

  • +
  • If request is non-null, then set document's referrer to the ApplicationCache : EventTarget { +

    Accept-CH-Lifetime cache

    +

    An Accept-CH-Lifetime cache is owned by + the user agent and consists of a list of entries where each entry has the following fields: +

    + +

    Entries must be removed after the seconds specified in the + max-age field have passed since + storing the entry. Entries may be removed before that. + +

    To create a new entry in the Accept-CH-Lifetime cache, given + origin, max-age, and client-hints list, do so as follows: +

    +
    origin +
    origin + +
    max-age +
    max-age + +
    client-hints list +
    client-hints list +
    +

    To retrieve + client-hints list, given an origin: +

      +
    1. Let client-hints list be an empty list.
    2. +
    3. Fetch any entries from Accept-CH-Lifetime + cache which origin is identical to origin. +
    4. +
    5. For each entry, for each token in its + client-hints list, if the token is not in client-hints list, add it.
    6. +
    7. Return client-hints list.
    8. +

    Web application APIs

    @@ -87014,6 +87089,13 @@ interface ApplicationCache : EventTarget { performed using this environment settings object as a request client. +
    A client hints list
    + +

    The client hints list for + fetches performed using this environment settings + object as a request client. +

    An environment settings object also has an outstanding rejected promises @@ -98961,6 +99043,15 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {

    +
    The client-hints list
    +
    + +

    Return the result of running Retrieve client-hints + list with origin as input.

    + +
    +
  • From 64265d3d210baad871b5e6f0e8208249dcc5e92c Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 26 Jun 2018 07:27:28 +0200 Subject: [PATCH 02/19] Removed export --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index c60ef3dfd94..ede9e78dee0 100644 --- a/source +++ b/source @@ -86766,7 +86766,7 @@ interface ApplicationCache : EventTarget {
    client-hints list -

    To retrieve +

    To retrieve client-hints list, given an origin:

    1. Let client-hints list be an empty list.
    2. @@ -87089,7 +87089,7 @@ interface ApplicationCache : EventTarget { performed using this environment settings object as a request client. -
      A A client hints list

      The client hints list for From 15f0eeb9bd446617faec3ce75ab472c17bfa5123 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 26 Jun 2018 08:20:25 +0200 Subject: [PATCH 03/19] Cookie note --- source | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source b/source index ede9e78dee0..6b2986318ae 100644 --- a/source +++ b/source @@ -86779,6 +86779,11 @@ interface ApplicationCache : EventTarget {

    3. Return client-hints list.
    +

    The Accept-CH lifetime cache can effectively act as an alternative cookie store, + since sites can use each of the hints as a bit set on the client, and that information will be + communicated to them on every request. As such, it is appropriate for user agents to evict that + cache whenever the user clears their cookies

    +

    Web application APIs

    Scripting

    From 59ff341026a92e37855fd2a9bd054b34862a60b0 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 26 Jun 2018 13:39:56 +0200 Subject: [PATCH 04/19] Add ACH and ACHL http-equiv processing --- source | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/source b/source index 6b2986318ae..134334c1cd3 100644 --- a/source +++ b/source @@ -14408,6 +14408,14 @@ interface HTMLMetaElement : HTMLElement { Content security policy content-security-policy + + Accept-CH + accept-ch + + + Accept-CH-Lifetime + accept-ch-lifetime + -
  • If response's - - Accept-CH-Lifetime header is present, and callerIsSecureContext is true, - call

    If response's `Accept-CH-Lifetime` header is present, and + callerIsSecureContext is true, call create a new entry with response - 's origin, the parsed max-age, and the client-hints list of the + 's origin, the parsed max-age, and settingsObject's + client-hints list of the Window object's environment settings object.

  • + +
  • If request is non-null, then set document's referrer to the ApplicationCache : EventTarget { storing the entry. Entries may be removed before that.

    To create a new entry in the Accept-CH-Lifetime cache, given - origin, max-age, and client-hints list, do so as follows: + data-definition-for="concept-accept-ch-lifetime-cache">add a new Accept-CH-Lifetime cache entry + in the Accept-CH-Lifetime cache, + given origin, max-age, and client-hints list, + add a new entry with the following fields to the Accept-CH-Lifetime cache:

    ApplicationCache : EventTarget {
    client-hints list
    -

    To retrieve - client-hints list, given an origin: +

    To retrieve the + client-hints list given an origin:

      -
    1. Let client-hints list be an empty list.
    2. -
    3. Fetch any entries from Accept-CH-Lifetime - cache which origin is identical to origin. -
    4. -
    5. For each entry, for each token in its - client-hints list, if the token is not in client-hints list, add it.
    6. -
    7. Return client-hints list.
    8. +
    9. Let client-hints list be an empty list.

    10. +
    11. Let originMatchingEntries be the entries in Accept-CH-Lifetime cache which + origin is identical to origin. +

    12. +
    13. For each entry in originMatchingEntries, for each token in its client-hints list, append it to + client-hints list.

    14. +
    15. Return client-hints list.

    The Accept-CH lifetime cache can effectively act as an alternative cookie store, since sites can use each of the hints as a bit set on the client, and that information will be communicated to them on every request. As such, it is appropriate for user agents to evict that - cache whenever the user clears their cookies

    + cache whenever the user clears their cookies. + +

    Web application APIs

    @@ -99138,7 +99154,7 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {

    Return the result of running Retrieve client-hints + data-x="concept-retrieve-client-hints-list-accept-ch-lifetime-cache">Retrieve the client-hints list with origin as input.

    @@ -121838,6 +121854,11 @@ INSERT INTERFACES HERE
    [CLDR]
    Unicode Common Locale Data Repository. Unicode.
    + +
    [COMPOSITE]
    Compositing and Blending, R. Cabanier, N. Andronikos. W3C.
    From 87e43fb780ad6c715ed3fee2b82ed1e360bda1cb Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Wed, 27 Jun 2018 10:39:04 +0200 Subject: [PATCH 06/19] s/list/set/ --- source | 61 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/source b/source index 22d97fb6ed2..9e5014d2f59 100644 --- a/source +++ b/source @@ -14902,7 +14902,7 @@ people expect to have work and what is necessary.

    This pragma sets the client-hints that the author is interested in for content-negotiation purposes. It does that by setting environment settings object's - client-hints list.

    + client-hints set.

    @@ -14923,7 +14923,7 @@ people expect to have work and what is necessary.
  • If callerIsSecureContext is true, parse acceptCHValue according to the `Accept-CH` header parsing rules. Add each parsed client hints token to the - client-hints list of + client-hints set of settingsObject.

  • @@ -14939,7 +14939,7 @@ people expect to have work and what is necessary.

    This pragma makes sure that client-hints are persistent on the origin for a specified time. It does so by adding the environment settings object's - client-hints list to the + client-hints set to the Accept-CH-Lifetime cache.

    @@ -14965,7 +14965,7 @@ people expect to have work and what is necessary. create a new entry with settingsObject's origin, the parsed max-age, and settingsObject's client-hints list.

    + data-x="concept-settings-object-client-hints-set">client-hints set.

    @@ -79516,12 +79516,12 @@ interface BarProp { policy.

    -
    The client-hints list
    +
    The client-hints set

    Return the result of running retrieve the client-hints - list with this environment settings object's retrieve the client-hints set with this environment settings object's origin.

    @@ -83007,7 +83007,7 @@ interface Location { // but see also client-hints list.

    + data-x="concept-settings-object-client-hints-set">client-hints set.

    @@ -83015,7 +83015,7 @@ interface Location { // but see also
    create a new entry with response 's origin, the parsed max-age, and settingsObject's - client-hints list of the + client-hints set of the Window object's environment settings object.

    @@ -86836,9 +86836,10 @@ interface ApplicationCache : EventTarget { origin)
  • max-age (a number of seconds)
  • -
  • client-hints-list
  • +
  • client-hints set
  • +

    Entries must be removed after the seconds specified in the max-age field have passed since @@ -86847,7 +86848,7 @@ interface ApplicationCache : EventTarget {

    To add a new Accept-CH-Lifetime cache entry in the Accept-CH-Lifetime cache, - given origin, max-age, and client-hints list, + given origin, max-age, and client-hints set, add a new entry with the following fields to the Accept-CH-Lifetime cache:

    @@ -86859,24 +86860,25 @@ interface ApplicationCache : EventTarget { data-definition-for="concept-accept-ch-lifetime-cache">max-age
    max-age -
    client-hints list -
    client-hints list +
    client-hints set +
    client-hints set
    -

    To retrieve the - client-hints list given an origin: +

    To retrieve the + client-hints set given an origin:

      -
    1. Let client-hints list be an empty list.

    2. +
    3. Let client-hints set be an empty ordered set.

    4. Let originMatchingEntries be the entries in Accept-CH-Lifetime cache which origin is identical to origin.

    5. For each entry in originMatchingEntries, for each token in its client-hints list, append it to - client-hints list.

    6. -
    7. Return client-hints list.

    8. + data-definition-for="accept-ch-lifetime-cache">client-hints set, append it to + client-hints set.

      + +
    9. Return client-hints set.

    The Accept-CH lifetime cache can effectively act as an alternative cookie store, @@ -87196,12 +87198,12 @@ interface ApplicationCache : EventTarget { performed using this environment settings object as a request client. -

    A client-hints list
    +
    A client-hints set
    -

    The client-hints list for - fetches performed using this environment settings - object as a request client. +

    A set of client hints used for fetches performed + using this environment settings object as a request client. @@ -99150,12 +99152,13 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {

    -
    The client-hints list
    +
    The client-hints set

    Return the result of running Retrieve the client-hints - list with origin as input.

    + data-x="concept-retrieve-client-hints-set-accept-ch-lifetime-cache" + >retrieve the client-hints set with origin as input.

    From bb976ad59baaa568c5c0726142b8b21fc269e5de Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Thu, 28 Jun 2018 23:30:07 +0200 Subject: [PATCH 07/19] Processing model changes --- source | 144 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 98 insertions(+), 46 deletions(-) diff --git a/source b/source index 9e5014d2f59..3c0da8345fa 100644 --- a/source +++ b/source @@ -4005,8 +4005,24 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

    The following terms are defined in Client Hints:

      -
    • Accept-CH
    • -
    • Accept-CH-Lifetime
    • +
    • Accept-CH +
    • +
    • + Accept-CH-Lifetime
    • +
    • Client-Hints +
    • +
    +
    + +
    +

    The following terms is defined in Fetch:

    +
      +
    • client-hints set +
    @@ -9251,6 +9267,12 @@ partial interface Document { empty string, which represents the default referrer policy used by fetches initiated by the Document.

    +

    The Document has a client-hints set (a + client-hints set), initially the empty set, which represents the default client hints used by fetches + initiated by the Document.

    +

    The Document has a CSP list, which is a CSP list containing all of the Content Security Policy objects active for the document. The @@ -14894,15 +14916,15 @@ people expect to have work and what is necessary. -

    Accept-CH - state (http-equiv=" + Accept-CH state (http-equiv="accept-ch")

    This pragma sets the client-hints that the author is interested in for content-negotiation - purposes. It does that by setting environment settings object's - client-hints set.

    + purposes. It does that by appending to the current Document's client-hints set.

    @@ -14921,10 +14943,12 @@ people expect to have work and what is necessary.
  • Let acceptCHValue be the meta element's content attribute's value.

  • -
  • If callerIsSecureContext is true, parse acceptCHValue according - to the `Accept-CH` header parsing rules. Add each parsed client hints token to the - client-hints set of - settingsObject.

  • +
  • If callerIsSecureContext is true and settingsObject's origin is identical to the top-level + frame's origin, parse acceptCHValue according + to the `Accept-CH` header parsing rules. Append each parsed client hints token to + the current Document's + client-hints set.

  • +
    @@ -14938,9 +14962,9 @@ people expect to have work and what is necessary.

    This pragma makes sure that client-hints are persistent on the origin for a specified time. - It does so by adding the environment settings object's - client-hints set to the - Accept-CH-Lifetime cache.

    + It does so by adding the current document's client-hints set to the Accept-CH-Lifetime cache.

    @@ -14963,9 +14987,9 @@ people expect to have work and what is necessary.
  • If callerIsSecureContext is true, parse acceptCHLifetimeValue according to the `Accept-CH-Lifetime` header parsing rules. Call create a new entry with - settingsObject's origin, the parsed max-age, and - settingsObject's client-hints set.

  • + settingsObject's origin, the parsed max-age, and the current + Document's client-hints set. +

    @@ -79519,10 +79543,12 @@ interface BarProp {
    The client-hints set
    -

    Return the result of running retrieve the client-hints set with this environment settings object's origin.

    +
      +
    1. Let document be the Document with which window is + currently associated.

    2. + +
    3. Return the document's client-hints set. +

    @@ -83001,24 +83027,38 @@ interface Location { // but see also
    retrieve the client-hints + set with settingsObject's origin.

    + +
  • For each entry in clientHintsSet, append + it to the Document's client-hints set.

  • +
  • Let callerIsSecureContext be the result of executing Is environment settings object a secure context? on settingsObject.

  • -
  • If response's `Accept-CH` - header is present, and callerIsSecureContext is true, add each - parsed client hints token to the settingsObject's client-hints set.

  • +
  • If response's `Accept-CH` header is present, and + callerIsSecureContext is true, add each parsed client hints token to the + Document's client-hints set. +

  • - + -
  • If response's `Accept-CH-Lifetime` header is present, and - callerIsSecureContext is true, call

    If response's `Accept-CH-Lifetime` header is present, + callerIsSecureContext is true, and the response's origin + is identical to the top-level document's origin, call create a new entry with response - 's origin, the parsed max-age, and settingsObject's - client-hints set of the - Window object's environment settings object.

  • + 's origin, the parsed max-age, and the Document's + client-hints set.

    - +
  • If request is non-null, then set document's Accept-CH-Lifetime cache

    An Accept-CH-Lifetime cache is owned by the user agent and consists of a list of entries where each entry has the following fields: -

    Entries must be removed after the seconds specified in the max-age field have passed since storing the entry. Entries may be removed before that.

    -

    The Accept-CH lifetime cache can effectively act as an alternative cookie store, +

    The Accept-CH lifetime cache can effectively act as an alternative cookie store, since sites can use each of the hints as a bit set on the client, and that information will be communicated to them on every request. As such, it is appropriate for user agents to evict that cache whenever the user clears their cookies. @@ -87276,7 +87285,7 @@ interface ApplicationCache : EventTarget {

    A client-hints set
    -

    A client-hints set used for

    A client-hints set used for fetches performed using this environment settings object as a request client. @@ -98450,7 +98459,7 @@ interface WorkerGlobalScope : EventTarget {

    A WorkerGlobalScope object has an associated client-hints - set (a client-hints set). It is + set (a client-hints set). It is initially the empty set.

    A WorkerGlobalScope object has an associated Date: Fri, 18 Jan 2019 15:54:17 +0100 Subject: [PATCH 13/19] Actually fix dfns --- source | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/source b/source index 0e9cab26fef..0c54455fca3 100644 --- a/source +++ b/source @@ -3948,7 +3948,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

    • establish a WebSocket connection
    • -
    • client-hints list

    The following terms are defined in the WebSocket protocol specification:

    @@ -9265,9 +9264,8 @@ partial interface Document { data-x="concept-fetch">fetches initiated by the Document.

    The Document has a client-hints set (a client-hints set), initially the empty set, which - represents the default client hints used by client-hints set (a client-hints set), initially the + empty set, which represents the default client hints used by fetches initiated by the Document.

    The Document has a

    Parse acceptCHValue according to the `Accept-CH` header parsing rules, as a field-name. Append each parsed client-hints token to the meta - element's node document's client-hints set.

  • + element's node document's client-hints set.

    @@ -86919,7 +86916,7 @@ interface ApplicationCache : EventTarget { seconds)
  • client-hints set (a - client-hints set).
  • + client-hints set).

    Entries must be removed after the seconds specified in the ApplicationCache : EventTarget {

    A client-hints set
    -

    A client-hints set used for fetches performed using this - environment settings object as a - request client. +

    A client-hints set used for fetches + performed using this environment settings object as a request client. @@ -98459,8 +98455,7 @@ interface WorkerGlobalScope : EventTarget {

    A WorkerGlobalScope object has an associated client-hints - set (a client-hints set). It is - initially the empty set.

    + set (a client-hints set). It is initially the empty set.

    A WorkerGlobalScope object has an associated CSP list, which From d92b24a84892f3e23fe088f30f89ca318f0eee68 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 18 Jan 2019 16:31:14 +0100 Subject: [PATCH 14/19] Move the http dfns to be with their friends --- source | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/source b/source index 0c54455fca3..25920e3d52a 100644 --- a/source +++ b/source @@ -2724,6 +2724,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

  • `Content-Language` header
  • `Last-Modified` header
  • `Referer` header
  • +
  • field-name
  • +
  • delta-seconds
  • The following terms are defined in the Cookie specification:

    @@ -4013,15 +4015,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
    -
    -

    The following terms are defined in HTTP:

    - -
      -
    • field-name
    • -
    • delta-seconds
    • -
    -
    -
    Content Security Policy
    @@ -14940,7 +14933,7 @@ people expect to have work and what is necessary. content attribute's value.

  • Parse acceptCHValue according to the `Accept-CH` header parsing - rules, as a field-name. field-name. Append each parsed client-hints token to the meta element's node document's client-hints set.

  • @@ -14995,7 +14988,7 @@ people expect to have work and what is necessary.
  • Parse acceptCHLifetimeValue according to the `Accept-CH-Lifetime` header parsing rules, as a delta-seconds. Add a new Accept-CH-Lifetime + data-x="http-delta-seconds">delta-seconds. Add a new Accept-CH-Lifetime cache entry with settingsObject's origin, the parsed max-age, and the current Document's client-hints @@ -82954,7 +82947,7 @@ interface Location { // but see also field-name. Add each parsed client hints token to the + data-x="http-field-name">field-name. Add each parsed client hints token to the Document's client-hints set.

  • @@ -82966,7 +82959,7 @@ interface Location { // but see also delta-seconds. Add a new + a delta-seconds. Add a new Accept-CH-Lifetime cache entry with response's origin, max-age, and the Document's client-hints set.

    From f57e541a4e1b1875a68f5602eaa6ef66620c53dd Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 8 Mar 2019 11:27:45 +0100 Subject: [PATCH 15/19] Add image-related Client Hints headers removed from the IETF draft --- source | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/source b/source index 25920e3d52a..3f8cb0a4c5a 100644 --- a/source +++ b/source @@ -4076,6 +4076,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
    +
    Structured Headers
    + +
    +

    The following terms are defined in Structured Headers:

    + +
      +
    • sh-float
    • +
    • sh-integer
    • +
    +
    + +
    Feature Policy
    @@ -28915,6 +28927,47 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ... +
    Image-related Client Hints request headers
    + There are several image-related Client Hints which enable proactive content negotiation of the + most adapted image based on the user's device characteristics. If these headers appear in a + request more than once or have multiple values, the server SHOULD only take the last value of the + last request header into account. + +
    DPR
    + The “DPR” request header field is a number that indicates the client’s current Device Pixel + Ratio (DPR). Its value SHOULD be identical to `window.devicePixelRatio`. + + + + The header's value is a sh-float. + +
    Viewport-Width
    + The “Viewport-Width” request header field is a number that indicates the layout viewport width + in CSS pixels. Its value SHOULD be the viewport width excluding the size of a + rendered scroll bar (if any), rounded to the smallest following integer (i.e. ceiling value). + + The header's value is a sh-integer. + +
    Width
    + The “Width” request header field is a number that indicates the desired resource width in CSS + pixels. Its value should be the initiator element's source set's source size, if one exists, + rounded to the smallest following integer (i.e. ceiling value). + + + The header's value is a sh-integer. + +
    Image-related response headers
    +
    Content-DPR
    + The “Content-DPR” response header field is a number that indicates the received image's + current pixel density. + + The header's value is a sh-float. + + + The current pixel density affects the calculation of density corrected intrinsic + size of image resources. As a result, the server MUST explicitly indicate the DPR of the + selected image response whenever the DPR client hint was used, or when the server otherwise + modified the image dimensions to compensate for the device's screen density.
    Requirements for providing text to act as an alternative for images
    @@ -122335,6 +122388,10 @@ INSERT INTERFACES HERE
    [SRI]
    Subresource Integrity, D. Akhawe, F. Braun, F. Marier, J. Weinberger. W3C.
    +
    [STRUCTUREDHEADERS]
    +
    Structured Headers, M. Nottingham, P-H. Kamp.
    + +
    [SVG]
    Scalable Vector Graphics (SVG) 2, N Andronikos, R. Atanassov, T. Bah, B. Birtles, B. Brinza, C. Concolato, E. Dahlström, C. Lilley, C. McCormack, D. Schepers, R. Schwerdtfeger, D. Storey, S. Takagi, J. Watt. W3C.
    From 88d4f724e025385a03a2a7c2af026cce87a46f72 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 15 Mar 2019 17:21:08 +0100 Subject: [PATCH 16/19] post-rebase fixups --- source | 74 ++++++++++++++++++++++------------------------------------ 1 file changed, 28 insertions(+), 46 deletions(-) diff --git a/source b/source index 3f8cb0a4c5a..22a524e074a 100644 --- a/source +++ b/source @@ -82982,14 +82982,6 @@ interface Location { // but see also origin.

    - -
  • For each hint in clientHintsSet, append hint to the Document's client-hints set.

  • -
  • Let evaluationStatus be the result of running the classic script script.

  • @@ -82997,26 +82989,6 @@ interface Location { // but see also
    field-name. Add each parsed client hints token to the - Document's client-hints - set.

    - -
  • Let topLevelOrigin be the origin of the top-level - browsing context's environment settings object's - origin.

  • - -
  • If response's `Accept-CH-Lifetime` header is present, - callerIsSecureContext is true, and the response's origin - is equal to topLevelOrigin, let max-age be the result of parsing the - header field value according to the `Accept-CH-Lifetime` header parsing rules, as - a delta-seconds. Add a new - Accept-CH-Lifetime cache entry with response's origin, - max-age, and the Document's client-hints set.

  • -
  • If Type(result) is String, then set response to a response whose Location { // but see also client-hints set.

  • -
  • Let callerIsSecureContext be the result of executing Is environment - settings object a secure context? on settingsObject.

  • +
  • Let settingsObject be the Document's + relevant settings object.

  • -
  • If response's `Accept-CH` header is present, and - callerIsSecureContext is true, add each parsed client hints token to the - Document's client-hints set. -

  • +
  • Let clientHintsSet be the result of running retrieve the client-hints + set with settingsObject's origin.

  • - +
  • For each hint in clientHintsSet, append hint to the Document's client-hints set.

  • -
  • If response's `Accept-CH-Lifetime` header is present, - callerIsSecureContext is true, and the response's origin - is identical to the top-level document's origin, call create a new entry with response - 's origin, the parsed max-age, and the Document's - client-hints set.

  • +
  • Let callerIsSecureContext be the result of executing Is environment + settings object a secure context? on settingsObject.

  • - +
  • Let topLevelOrigin be the origin of the top-level + browsing context's environment settings object's + origin.

  • + +
  • If response's `Accept-CH-Lifetime` header is present, + callerIsSecureContext is true, and the response's origin + is equal to topLevelOrigin, let max-age be the result of parsing the + header field value according to the `Accept-CH-Lifetime` header parsing rules, as + a delta-seconds. Add a new + Accept-CH-Lifetime cache entry with response's origin, + max-age, and the Document's client-hints set.

  • If request is non-null, then set document's

    Let settingsObject be the Document's relevant settings object.

  • -
  • Let clientHintsSet be the result of running retrieve the client-hints +

  • Let clientHintsSet be the result of running retrieve the client-hints set with settingsObject's origin.

  • -
  • For each entry in clientHintsSet, append - it to the Document's client-hints set.

  • - -
  • Let settingsObject be the Document's - relevant settings object.

  • - -
  • Let clientHintsSet be the result of running retrieve the client-hints - set with settingsObject's origin.

  • - -
  • For each hint in clientHintsSet, append hint to the Document's client-hints set.

  • -
  • Let callerIsSecureContext be the result of executing Is environment +

  • Let callerIsSecureContext be the result of executing Is environment settings object a secure context? on settingsObject.

  • If response's `Accept-CH` header is present, and From 335f566e0162a8fdb71e0acd513cff148e32eb53 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Mon, 18 Mar 2019 22:20:28 +0100 Subject: [PATCH 18/19] Added policy controlled features --- source | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/source b/source index 078d26ca0ca..3087d8ae5ba 100644 --- a/source +++ b/source @@ -4425,6 +4425,45 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

  • "document-domain", which has a default allowlist of *.
  • +
  • "ch-dpr", which + has a default allowlist of 'self'.
  • +
  • "ch-viewport-width", which + has a default allowlist of 'self'.
  • +
  • "ch-width", which + has a default allowlist of 'self'.
  • +
  • "ch-rtt", which + has a default allowlist of 'self'.
  • +
  • "ch-downlink", which + has a default allowlist of 'self'.
  • +
  • "ch-ect", which + has a default allowlist of 'self'.
  • +
  • "ch-save-data", which + has a default allowlist of 'self'.
  • +
  • "ch-device-memory", which + has a default allowlist of 'self'.
  • +
  • "ch-ua", which + has a default allowlist of 'self'.
  • +
  • "ch-arch", which + has a default allowlist of 'self'.
  • +
  • "ch-model", which + has a default allowlist of 'self'.
  • +
  • "ch-platform", which + has a default allowlist of 'self'.
  • +
  • "ch-lang", which + has a default allowlist of 'self'.
  • From ddb0544ee65e056d5d9e3e8f030d931f02cc7b7f Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 26 Mar 2019 10:44:33 +0100 Subject: [PATCH 19/19] s/list/set/ --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 3087d8ae5ba..c2c3c19cbc8 100644 --- a/source +++ b/source @@ -2770,7 +2770,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • A network scheme
  • A fetch scheme
  • HTTPS state value
  • -
  • client-hints set
  • +
  • client-hints set
  • CORS protocol
  • default `User-Agent` value
  • extract a MIME type