diff --git a/index.bs b/index.bs index b67c812d..5abcd6fe 100644 --- a/index.bs +++ b/index.bs @@ -627,12 +627,15 @@ partial interface HTMLIFrameElement { following steps:

1. Let |inherited policy| be a new ordered map. 2. Let |declared policy| be a new ordered map. - 3. For each supported feature |feature|: + 3. Let |container policy| be the result of calling process feature + policy attributes on |node|. + 4. For each supported feature |feature|: 1. Let |isInherited| be the result of running Define an inherited - policy for feature in container at origin on |feature|, - |node| and |node|'s declared origin. + policy for feature in browsing context on |feature|, + |node|'s nested browsing context, |container policy|, and + |node|'s declared origin. 2. Set |inherited policy|[|feature|] to |isInherited|. - 4. Return a new feature policy with inherited policy + 5. Return a new feature policy with inherited policy |inherited policy| and declared policy |declared policy|.

To get the declared origin for an Element |node|, run the @@ -845,8 +848,8 @@ partial interface HTMLIFrameElement {

-

Process feature policy - attributes

+

Process feature + policy attributes

Given an element (element), this algorithm returns a container policy, which may be empty.

    @@ -888,9 +891,10 @@ partial interface HTMLIFrameElement {

Create a - Feature Policy for a browsing context

-

Given a browsing context (browsingContext), and an origin - (origin) this algorithm returns a new Feature Policy.

+ Feature Policy for a browsing context +

Given a browsing context (browsingContext), a container policy + containerPolicy, and an origin (origin) this + algorithm returns a new Feature Policy.

  1. Let inherited policy be a new ordered map.
  2. Let declared policy be a new ordered map.
  3. @@ -898,7 +902,8 @@ partial interface HTMLIFrameElement {
    1. Let isInherited be the result of running Define an inherited policy for feature in browsing - context on feature, origin and browsingContext. + context on feature, browsingContext, + containerPolicy, and origin.
    2. Set inherited policy[feature] to isInherited.
    3. @@ -913,14 +918,16 @@ partial interface HTMLIFrameElement {

Create a Feature - Policy for a browsing context from response

-

Given a browsing context (browsingContext), origin - (origin), and a [=response=] (response), this algorithm returns a new - Feature Policy

+ id="create-from-response">Create a Feature Policy for a browsing + context from response +

Given a browsing context (browsingContext), a + container policy (containerPolicy), an origin + (origin), and a [=response=] (response), this + this algorithm returns a new Feature Policy.

  1. Let policy be the result of running Create a Feature Policy for a browsing - context given browsingContext, and origin.
  2. + context given browsingContext, containerPolicy, + and origin.
  3. Let d be the result of running Process response policy on response and origin.
  4. @@ -935,50 +942,31 @@ partial interface HTMLIFrameElement {
-

Define an inherited policy for +

Define an inherited policy for feature in browsing context

-

Given a feature (feature), an origin (origin), and - a browsing context (browsingContext), this algorithm returns the - inherited policy for that feature.

+

Given a feature (feature) a browsing context + (browsingContext), a container policy + (containerPolicy), and an origin (origin), this + algorithm returns the inherited policy for that feature.

    -
  1. If browsingContext is the [=nested browsing context=] of a - [=browsing context container=] element, return the result of - executing Define an inherited policy for feature in container at - origin for feature in browsingContext's browsing - context container at origin.
  2. -
  3. Otherwise, return "Enabled".
  4. -
-

-
-

Define an inherited - policy for feature in container at - origin

-

Given a feature (feature) a browsing context container - (container), and an origin for a document in that - container (origin), this algorithm returns the inherited - policy for that feature.

-
    -
  1. Let parent be container's node - document.
  2. -
  3. Let container policy be the result of running - Process feature policy attributes on - container. -
  4. -
  5. If feature is a key in container policy: +
  6. If feature is a key in containerPolicy:
    1. If the allowlist for feature in - container policy does not match origin, + containerPolicy does not match origin, return "Disabled".
    2. -
    3. If feature is enabled in - parent for parent's origin, - return "Enabled". -
    4. -
    -
  7. -
  8. If feature is - enabled in parent for origin, return - "Enabled". +
  9. If browsingContext has a [=parent browsing context=], + then +
      +
    1. Let parent be browsingContext's [=parent + browsing context=].
    2. +
    3. If feature is enabled + in parent for parent's + origin, return "Enabled".
    4. +
    +
  10. +
  • Otherwise return "Disabled".