:
-1. If [=PermissionsMixin/get the current permission state=] is not
+1. If [=PowerfulFeatureObserver/get the current permission state=] is not
{{PermissionState/granted}}, then return.
1. If {{HTMLGeolocationElement/autolocate}} is not true, then return.
1. [=Fetch location=].
@@ -386,14 +386,13 @@ To
To determine whether an |element| is
type permissible:
-1. [=Assert=]: |element|'s [=node navigable=]'s {{[[PermissionElements]]}}
+1. [=Assert=]: |element|'s [=node navigable=]'s {{[[ActivationBlockableElements]]}}
[=set/contains=] |element|.
1. Let |count| be 0.
1. [=list/iterate|For each=] |current| in
- |element|'s [=node navigable=]'s {{[[PermissionElements]]}}:
+ |element|'s [=node navigable=]'s {{[[ActivationBlockableElements]]}}:
1. If |current| is |element|, then [=iteration/break=].
1. If |element|.{{[[Features]]}} [=set/equals=] |current|.{{[[Features]]}}
-
then increment |count| by 1.
1. Return whether |count| is less than 3.
@@ -404,7 +403,7 @@ To
recheck type permissibility for a
|document|:
1. [=list/iterate|For each=] |current| in |document|'s
- {{[[PermissionElements]]}}:
+ {{[[ActivationBlockableElements]]}}:
1. If |current| is [=type permissible=], then [=remove blockers=] with
{{ActivationBlockersMixinBlockerReason/unsuccessful_registration}} from
|current|.
@@ -430,15 +429,15 @@ determined by the browser, rather than the page, and reflects its function of gi
access to {{Geolocation}} functionality. The element may also convey information about
the current permission state of the
"geolocation" [=powerful feature=].
-The page can influence the permission elements' styling, but with
+The page can influence the element's styling, but with
constraints to prevent abuse (e.g. minimum and maximum sizes for fonts and
the label itself). These are described in [[#rendering]].
The page can also select a locale for the text via the <{html-global/lang}> attribute.
-The permission elements support [=fallback content=], which will be
+<{geolocation}> supports [=fallback content=], which will be
displayed by any browser not yet supporting that element. Note that
there are also conditions under which a browser that supports
-a respective permission element falls back to its [=fallback content=].
+<{geolocation}> will fall back to its [=fallback content=], as described in [[#fallback]].
# Mixins and Infrastructure # {#all-the-mixins}
@@ -789,13 +788,13 @@ ISSUE: Do I need to define dictionary equality?
## Powerful Features, aka Permissions ## {#mixin-permissions}
To support elements that gate access to [=powerful features=], you can use the
-{{PermissionsMixin}}.
+{{PowerfulFeatureObserver}}.
- [=DOM interface=]:
-
- interface mixin PermissionsMixin {
+ interface mixin PowerfulFeatureObserver {
readonly attribute PermissionState initialPermissionStatus;
readonly attribute PermissionState permissionStatus;
attribute EventHandler onpromptaction;
@@ -805,22 +804,22 @@ To support elements that gate access to [=powerful features=], you can use the
-The following are the [=event handlers=] (and their corresponding [=event handler event types=]) that must be supported on elements that include the {{PermissionsMixin}}:
+The following are the [=event handlers=] (and their corresponding [=event handler event types=]) that must be supported on elements that include the {{PowerfulFeatureObserver}}:
onpromptaction: Event
onpromptdismiss: Event
-The
PermissionsMixin attributes are:
+The
PowerfulFeatureObserver attributes are:
-* {{PermissionsMixin/initialPermissionStatus}}
-* {{PermissionsMixin/permissionStatus}}
-* {{PermissionsMixin/onpromptaction}}
-* {{PermissionsMixin/onpromptdismiss}}
+* {{PowerfulFeatureObserver/initialPermissionStatus}}
+* {{PowerfulFeatureObserver/permissionStatus}}
+* {{PowerfulFeatureObserver/onpromptaction}}
+* {{PowerfulFeatureObserver/onpromptdismiss}}
### Internal state ### {#mixin-permissions-internal-state}
-The {{PermissionsMixin}} [=represents=] capabilities gated by user-requestable
+The {{PowerfulFeatureObserver}} [=represents=] capabilities gated by user-requestable
[=permissions=], which the user can activate to allow the site to start accessing them.
It is core to the these elements that such requests are
triggered by the user, and not by the page's script. To enforce
@@ -828,63 +827,63 @@ this, the element checks whether the activation event is {{Event/isTrusted|trust
(partially) occluded, or if it has recently been moved. The element maintains
an internal {{[[BlockerList]]}} to keep track of this.
-{{PermissionsMixin}} elements have the following internal slots:
+{{PowerfulFeatureObserver}} elements have the following internal slots:
-*
\[[Features]] is null
+*
\[[Features]] is null
or an [=ordered set=] of [=powerful features=]. For most permission
elements this is likely a fixed set, while for some this may be variable.
Making it an internal slot allows us to write algorithms that work for all
of them.
-*
\[[InitialPermissionStatus]]
+*
\[[InitialPermissionStatus]]
is a {{PermissionState}} that stores the initial {{PermissionState}} for
{{[[Features]]}}.
### Algorithms ### {#mixin-permissions-algorithms}
-A {{PermissionsMixin}}'s initialization steps are:
+A {{PowerfulFeatureObserver}}'s initialization steps are:
-1. [=Assert=]: The internal {{PermissionsMixin/[[Features]]}} slot has been
+1. [=Assert=]: The internal {{PowerfulFeatureObserver/[[Features]]}} slot has been
initialized. The including element must define and initialize this.
-1. Initialize the internal {{PermissionsMixin/[[InitialPermissionStatus]]}} to
- the result of [=PermissionsMixin/get the current permission state=].
+1. Initialize the internal {{PowerfulFeatureObserver/[[InitialPermissionStatus]]}} to
+ the result of [=PowerfulFeatureObserver/get the current permission state=].
-A {{PermissionsMixin}}'s insertion steps are:
+A {{PowerfulFeatureObserver}}'s insertion steps are:
-1. If {{PermissionsMixin/[[Features]]}} [=list/is empty=] or is null,
+1. If {{PowerfulFeatureObserver/[[Features]]}} [=list/is empty=] or is null,
then [=add a permanent blocker=]
with reason {{ActivationBlockersMixinBlockerReason/type_invalid}}.
-A {{PermissionsMixin}} |element|'s
-initialPermissionStatus
+A {{PowerfulFeatureObserver}} |element|'s
+initialPermissionStatus
getter steps are:
-1. Return |element|'s internal {{PermissionsMixin/[[InitialPermissionStatus]]}}.
+1. Return |element|'s internal {{PowerfulFeatureObserver/[[InitialPermissionStatus]]}}.
-A {{PermissionsMixin}} |element|'s
-permissionStatus
+A {{PowerfulFeatureObserver}} |element|'s
+permissionStatus
getter steps are:
-1. Return [=PermissionsMixin/get the current permission state=] for
+1. Return [=PowerfulFeatureObserver/get the current permission state=] for
|element|.
-To get the current permission state for
-a {{PermissionsMixin}} |element|:
+To get the current permission state for
+a {{PowerfulFeatureObserver}} |element|:
-1. Let |features| be |element|'s internal {{PermissionsMixin/[[Features]]}}.
+1. Let |features| be |element|'s internal {{PowerfulFeatureObserver/[[Features]]}}.
1. If |features| is null or |features| is [=list/empty=],
return "{{PermissionState/prompt}}".
1. Let |current| be "{{PermissionState/granted}}".
@@ -905,12 +904,12 @@ ISSUE: It's not clear what the PermissionState for 'no valid permission type'
-To
dispatch onpromptaction for |element|:
+To
dispatch onpromptaction for |element|:
1. Let |event| be a new {{Event}}.
1. [=Event/Initialize=] |event| with
type
- "{{PermissionsMixin/onpromptaction}}",
+ "{{PowerfulFeatureObserver/onpromptaction}}",
bubbles
true, and
cancelable
@@ -920,12 +919,12 @@ To
dispatch onpromptaction for |element|:
-To
dispatch onpromptdismiss for |element|:
+To
dispatch onpromptdismiss for |element|:
1. Let |event| be a new {{Event}}.
1. [=Event/Initialize=] |event| with
type
- "{{PermissionsMixin/onpromptdismiss}}",
+ "{{PowerfulFeatureObserver/onpromptdismiss}}",
bubbles
true, and
cancelable
@@ -935,7 +934,7 @@ To
dispatch onpromptdismiss for |element|:
-To
build a permission descriptor for an
+To
build a permission descriptor for an
|element|:
ISSUE: The [[Permissions]] specification assumes a descriptor describes a
@@ -957,7 +956,7 @@ in [[Permissions]], plus adaptions here.
ISSUE: There isn't much precedence for describing the user agent UI in detail.
It may be better to leave more freedom to user agents.
-An element using the {{PermissionsMixin}} contains browser-chosen content, text and maybe an
+An element using the {{PowerfulFeatureObserver}} contains browser-chosen content, text and maybe an
icon. Activating them will often [=prompt the user to choose=].
This provides two bits of user interface that a user can interact with.
The [=user agent=] is largely free to determine these — rendering of the
@@ -1010,7 +1009,7 @@ instead of its usual rendering.
## Styling, and Styling Restrictions ## {#rendering}
-Permission elements constrain the styling that can be applied to them.
+<{geolocation}> elements constrain the styling that can be applied to them.
These constraints come in three flavours:
1. If the condition isn't met, the element is deactivated.
@@ -1047,7 +1046,7 @@ ISSUE: Define "alpha".
### User-Agent Defined Stylesheet ### {#style-stylesheet}
-A permission element is expected to render with the following styles:
+A <{geolocation}> element is expected to render with the following styles:
@namespace "http://www.w3.org/1999/xhtml";
@@ -1065,7 +1064,7 @@ geolocation {
### Additional User-Agent Defined Style Bounds ### {#style-style-bounds}
-Permission elements define several bounds on styles. For example, we want
+<{geolocation}> elements define several bounds on styles. For example, we want
the font size are constraints on the The style bounds are explained below.
For notational convenience, we imagine that the [=computed value=] of an element