From 5ad2e273764fe961d1097c87414a8f3e9bbc95cb Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Mon, 6 May 2024 21:42:06 +0200 Subject: [PATCH 01/19] Add an autofill module --- index.bs | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/index.bs b/index.bs index 302cf3b8..ab347d76 100644 --- a/index.bs +++ b/index.bs @@ -11816,6 +11816,161 @@ The [=remote end steps=] given |session| and |command parameters| are: +## The autofill Module ## {#module-autofill} + +The autofill module contains functionality for +saving and triggering autofill. + +A browsing context has a autofill store for testing, an +ordered map. + +### Definition ### {#module-autofill-definition} + +[=remote end definition=] + +
+
+InputCommand = (
+  autofill.save //
+  autofill.trigger
+)
+
+ +### Commands ### {#module-autofill-commands} + +#### The autofill.save Command #### {#command-autofill-save} + +The autofill.save command saves a set of field +name values to the browsing context's [=autofill store for testing=]. + +
+
Command Type
+
+
+      autofill.save = (
+        method: "autofill.save",
+        params: autofill.saveParameters
+      )
+
+      autofill.saveParameters = {
+        context: browsingContext.BrowsingContext,
+        fields: [*autofill.field]
+      }
+
+      autofill.field = (
+        autofill.fieldName /
+        autofill.fieldValue
+      )
+    
+
+
Return Type
+
+
+     EmptyResult
+    
+
+
+ +
+ +The [=remote end steps=] with |session| and |command parameters| are: + +1. Let |context id| be the value of the context field of + |command parameters|. + +1. Let |context| be the result of [=trying=] to [=get a browsing context=] + with |context id|. + +1. Let |store| be |context|'s [=autofill store for testing=]. + +1. Let |fields| be the value of the fields field of |command + parameters|. + +1. For each |field| in |fields|: + + 1. Let |name| be |field|'s |fieldName|. + + 1. Let |value| be |field|'s |fieldValue|. + + 1. Set |store|[|fieldName|] to |fieldValue|. + +1. Return [=success=] with data null. +
+ +#### The autofill.trigger Command #### {#command-autofill-trigger} + +The autofill.trigger command triggers autofill +on a particular form field using the browsing context's [=autofill +store for testing=]. + +
+
Command Type
+
+
+      autofill.trigger = (
+        method: "autofill.trigger",
+        params: autofill.triggerParameters
+      )
+
+      autofill.triggerParameters = {
+        context: browsingContext.BrowsingContext,
+        element: script.SharedReference
+      }
+    
+
+
Return Type
+
+
+     EmptyResult
+    
+
+
+ +
+ +The [=remote end steps=] with |session| and |command parameters| are: + +1. Let |context id| be the value of the context field of + |command parameters|. + +1. Let |context| be the result of [=trying=] to [=get a browsing context=] + with |context id|. + +1. Let |document| be |context|'s [=active document=]. + +1. Let |environment settings| be the [=environment settings object=] whose + [=relevant global object=]'s associated Document is + |document|. + +1. Let |realm| be |environment settings|' [=realm execution context=]'s + Realm component. + +1. Let |element id| be the value of the element field of + |command parameters|. + +1. Let |element| be the result of [=trying=] to [=deserialize remote reference=] + with the |element id|, |realm|, and |session|. + +1. Let |store| be |context|'s [=autofill store for testing=]. + +1. If |element| is not [=form associated=] or |element|'s [=form owner=] is + null, return an [=error=] with [=error code=] [=invalid element state=]. + +1. The [=user agent=] should [=autofill=] |element| and |element|'s [=form + owner=], while taking into account the contents of |context|'s [=autofill + store for testing=]. + +1. Return [=success=] with data null. +
+# Patches to Other Specifications # {#patches} + +This specification requires some changes to external specifications to provide the necessary +integration points. It is assumed that these patches will be committed to the other specifications +as part of the standards process. + +## HTML ## {#patches-html} + +The [=a browsing context is discarded=] algorithm is modified to read as follows: ### Events ### {#module-input-events} #### The input.fileDialogOpened Event #### {#event-input-fileDialogOpened} From 9551190a4deb7b7e96aec9b0c851f8c6df3a6931 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Mon, 6 May 2024 22:10:53 +0200 Subject: [PATCH 02/19] Fixed up some bikeshed defs --- index.bs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index ab347d76..49b6151d 100644 --- a/index.bs +++ b/index.bs @@ -296,6 +296,9 @@ spec: RFC9110; urlPrefix: https://httpwg.org/specs/rfc9110.html type: dfn text: field-name token; url: #fields.names text: method token; url: #method.overview +spec:infra; urlPrefix: https://infra.spec.whatwg.org/ + type:dfn; + text:user agent
@@ -11821,7 +11824,7 @@ The [=remote end steps=] given |session| and |command parameters| are:
 The autofill module contains functionality for
 saving and triggering autofill.
 
-A browsing context has a autofill store for testing, an
+A [=/browsing context=] has a autofill store for testing, an
 ordered map.
 
 ### Definition ### {#module-autofill-definition}
@@ -11841,7 +11844,7 @@ InputCommand = (
 #### The autofill.save Command ####  {#command-autofill-save}
 
 The autofill.save command saves a set of field
-name values to the browsing context's [=autofill store for testing=].
+name values to the [=/browsing context=]'s [=autofill store for testing=].
 
 
Command Type
@@ -11873,7 +11876,8 @@ name values to the browsing context's [=autofill store for testing=].
-The [=remote end steps=] with |session| and |command parameters| are: +The [=remote end steps=] with session and +|command parameters| are: 1. Let |context id| be the value of the context field of |command parameters|. @@ -11888,19 +11892,20 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. For each |field| in |fields|: - 1. Let |name| be |field|'s |fieldName|. + 1. Let |name| be |field|'s fieldName. - 1. Let |value| be |field|'s |fieldValue|. + 1. Let |value| be |field|'s fieldValue. - 1. Set |store|[|fieldName|] to |fieldValue|. + 1. Set |store|[|name|] to |value|. 1. Return [=success=] with data null. +
#### The autofill.trigger Command #### {#command-autofill-trigger} The autofill.trigger command triggers autofill -on a particular form field using the browsing context's [=autofill +on a particular form field using the [=/browsing context=]'s [=autofill store for testing=].
@@ -11957,11 +11962,12 @@ The [=remote end steps=] with |session| and |command parameters| are: null, return an [=error=] with [=error code=] [=invalid element state=]. 1. The [=user agent=] should [=autofill=] |element| and |element|'s [=form - owner=], while taking into account the contents of |context|'s [=autofill - store for testing=]. + owner=], while taking into account the contents of |store|. 1. Return [=success=] with data null. + + # Patches to Other Specifications # {#patches} This specification requires some changes to external specifications to provide the necessary From 9276eb6f31e7d25644bf9195e837d607780a9cc3 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 7 May 2024 07:23:58 +0200 Subject: [PATCH 03/19] Fix two more linking issues --- index.bs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 49b6151d..4e02db04 100644 --- a/index.bs +++ b/index.bs @@ -84,6 +84,7 @@ spec: WEBDRIVER; urlPrefix: https://w3c.github.io/webdriver/ text: input cancel list; url: dfn-input-cancel-list text: intermediary node; url: dfn-intermediary-nodes text: invalid argument; url: dfn-invalid-argument + text: invalid element state; url: dfn-invalid-element-state text: invalid selector; url: dfn-invalid-selector text: invalid session id; url: dfn-invalid-session-id text: is element origin; url: dfn-is-element-origin @@ -191,6 +192,7 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: close; url: document-sequences.html#close-a-top-level-traversable text: disabled; url: form-control-infrastructure.html#concept-fe-disabled text: File Upload state; url: input.html#file-upload-state-(type=file) + text: form-associated element; url: forms.html#form-associated-element text: confirm; url: timers-and-user-prompts.html#dom-confirm text: context mode; url: /canvas.html#offscreencanvas-context-mode text: create a classic script; url: webappapis.html#creating-a-classic-script @@ -661,6 +663,7 @@ with the following additional codes:
 ErrorCode = "invalid argument" /
             "invalid selector" /
+            "invalid element state" /
             "invalid session id" /
             "invalid web extension" /
             "move target out of bounds" /
@@ -11958,7 +11961,7 @@ The [=remote end steps=] with |session| and |command parameters| are:
 
 1. Let |store| be |context|'s [=autofill store for testing=].
 
-1. If |element| is not [=form associated=] or |element|'s [=form owner=] is
+1. If |element| is not a [=form-associated element=] or |element|'s [=form owner=] is
    null, return an [=error=] with [=error code=] [=invalid element state=].
 
 1. The [=user agent=] should [=autofill=] |element| and |element|'s [=form

From 6ee27a8cd4a599f9282357c6da4d8d3b93b29807 Mon Sep 17 00:00:00 2001
From: Yoav Weiss 
Date: Tue, 7 May 2024 08:00:19 +0200
Subject: [PATCH 04/19] Fix up cddl

---
 index.bs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/index.bs b/index.bs
index 4e02db04..e9a94a07 100644
--- a/index.bs
+++ b/index.bs
@@ -11864,8 +11864,8 @@ name values to the [=/browsing context=]'s [=autofill store for testing=].
       }
 
       autofill.field = (
-        autofill.fieldName /
-        autofill.fieldValue
+        name: tstr,
+        value: tstr
       )
     
@@ -11895,9 +11895,9 @@ The [=remote end steps=] with session and 1. For each |field| in |fields|: - 1. Let |name| be |field|'s fieldName. + 1. Let |name| be |field|'s name. - 1. Let |value| be |field|'s fieldValue. + 1. Let |value| be |field|'s value. 1. Set |store|[|name|] to |value|. From acb45d82407274b12b0724a23a694d372453c71b Mon Sep 17 00:00:00 2001 From: martinlechner Date: Tue, 28 May 2024 17:31:29 +0200 Subject: [PATCH 05/19] remove autofill.save, describe autofill store explicitly for each test --- index.bs | 85 +++++++++++++------------------------------------------- 1 file changed, 20 insertions(+), 65 deletions(-) diff --git a/index.bs b/index.bs index e9a94a07..728e76ae 100644 --- a/index.bs +++ b/index.bs @@ -11824,8 +11824,7 @@ The [=remote end steps=] given |session| and |command parameters| are: ## The autofill Module ## {#module-autofill} -The autofill module contains functionality for -saving and triggering autofill. +The autofill module contains functionality for triggering autofill. A [=/browsing context=] has a autofill store for testing, an ordered map. @@ -11837,74 +11836,12 @@ A [=/browsing context=] has a autofill store for testing, an
 
 InputCommand = (
-  autofill.save //
   autofill.trigger
 )
 
### Commands ### {#module-autofill-commands} -#### The autofill.save Command #### {#command-autofill-save} - -The autofill.save command saves a set of field -name values to the [=/browsing context=]'s [=autofill store for testing=]. - -
-
Command Type
-
-
-      autofill.save = (
-        method: "autofill.save",
-        params: autofill.saveParameters
-      )
-
-      autofill.saveParameters = {
-        context: browsingContext.BrowsingContext,
-        fields: [*autofill.field]
-      }
-
-      autofill.field = (
-        name: tstr,
-        value: tstr
-      )
-    
-
-
Return Type
-
-
-     EmptyResult
-    
-
-
- -
- -The [=remote end steps=] with session and -|command parameters| are: - -1. Let |context id| be the value of the context field of - |command parameters|. - -1. Let |context| be the result of [=trying=] to [=get a browsing context=] - with |context id|. - -1. Let |store| be |context|'s [=autofill store for testing=]. - -1. Let |fields| be the value of the fields field of |command - parameters|. - -1. For each |field| in |fields|: - - 1. Let |name| be |field|'s name. - - 1. Let |value| be |field|'s value. - - 1. Set |store|[|name|] to |value|. - -1. Return [=success=] with data null. - -
- #### The autofill.trigger Command #### {#command-autofill-trigger} The autofill.trigger command triggers autofill @@ -11922,8 +11859,14 @@ store for testing=]. autofill.triggerParameters = { context: browsingContext.BrowsingContext, - element: script.SharedReference + element: script.SharedReference, + fields: [*autofill.field] } + + autofill.field = ( + name: tstr, + value: tstr + )
Return Type
@@ -11961,6 +11904,18 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. Let |store| be |context|'s [=autofill store for testing=]. +1. Let |fields| be the value of the fields field of |command + parameters|. + +1. For each |field| in |fields|: + + 1. Let |name| be |field|'s name. + + 1. Let |value| be |field|'s value. + + 1. Set |store|[|name|] to |value|. + + 1. If |element| is not a [=form-associated element=] or |element|'s [=form owner=] is null, return an [=error=] with [=error code=] [=invalid element state=]. From 87f2b1f5f0d4e392716b4c2f91f45ef115f679b9 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Thu, 30 May 2024 09:43:24 +0200 Subject: [PATCH 06/19] Remove the context autofill store and fix linking --- index.bs | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/index.bs b/index.bs index 728e76ae..804766af 100644 --- a/index.bs +++ b/index.bs @@ -189,6 +189,7 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: activation notification; url: interaction.html#activation-notification text: active window; url: document-sequences.html#nav-window text: alert; url: timers-and-user-prompts.html#dom-alert + text: autofill; url: form-control-infrastructure.html#autofill text: close; url: document-sequences.html#close-a-top-level-traversable text: disabled; url: form-control-infrastructure.html#concept-fe-disabled text: File Upload state; url: input.html#file-upload-state-(type=file) @@ -11824,10 +11825,7 @@ The [=remote end steps=] given |session| and |command parameters| are: ## The autofill Module ## {#module-autofill} -The autofill module contains functionality for triggering autofill. - -A [=/browsing context=] has a autofill store for testing, an -ordered map. +The autofill module contains functionality for triggering autofill. ### Definition ### {#module-autofill-definition} @@ -11845,8 +11843,7 @@ InputCommand = ( #### The autofill.trigger Command #### {#command-autofill-trigger} The autofill.trigger command triggers autofill -on a particular form field using the [=/browsing context=]'s [=autofill -store for testing=]. +on a particular form field using the provided fields.
Command Type
@@ -11860,7 +11857,7 @@ store for testing=]. autofill.triggerParameters = { context: browsingContext.BrowsingContext, element: script.SharedReference, - fields: [*autofill.field] + fields: [*autofill.field] } autofill.field = ( @@ -11902,25 +11899,14 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. Let |element| be the result of [=trying=] to [=deserialize remote reference=] with the |element id|, |realm|, and |session|. -1. Let |store| be |context|'s [=autofill store for testing=]. - 1. Let |fields| be the value of the fields field of |command parameters|. -1. For each |field| in |fields|: - - 1. Let |name| be |field|'s name. - - 1. Let |value| be |field|'s value. - - 1. Set |store|[|name|] to |value|. - - 1. If |element| is not a [=form-associated element=] or |element|'s [=form owner=] is null, return an [=error=] with [=error code=] [=invalid element state=]. 1. The [=user agent=] should [=autofill=] |element| and |element|'s [=form - owner=], while taking into account the contents of |store|. + owner=], while taking into account the contents of |fields|. 1. Return [=success=] with data null. From f835a9d3ddb0b370dc6401b8bfa282079c3b4186 Mon Sep 17 00:00:00 2001 From: martinlechner Date: Wed, 5 Jun 2024 19:45:17 +0200 Subject: [PATCH 07/19] upper/lowercase fixes --- index.bs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index 804766af..5e843431 100644 --- a/index.bs +++ b/index.bs @@ -438,7 +438,8 @@ CommandData = ( ScriptCommand // SessionCommand // StorageCommand // - WebExtensionCommand + WebExtensionCommand // + AutofillCommand ) EmptyParams = { @@ -11833,7 +11834,7 @@ The autofill module contains functionality for tri
 
-InputCommand = (
+AutofillCommand = (
   autofill.trigger
 )
 
@@ -11849,20 +11850,20 @@ on a particular form field using the provided fields.
Command Type
-      autofill.trigger = (
+      autofill.Trigger = (
         method: "autofill.trigger",
-        params: autofill.triggerParameters
+        params: autofill.TriggerParameters
       )
 
-      autofill.triggerParameters = {
+      autofill.TriggerParameters = {
         context: browsingContext.BrowsingContext,
         element: script.SharedReference,
-        fields: [*autofill.field]
+        fields: [*autofill.Field]
       }
 
-      autofill.field = (
-        name: tstr,
-        value: tstr
+      autofill.Field = (
+        name: text,
+        value: text
       )
     
From ec03ec66f9ef7366636f282c080ecff86219da91 Mon Sep 17 00:00:00 2001 From: martinlechner Date: Wed, 5 Jun 2024 20:15:41 +0200 Subject: [PATCH 08/19] specify valid autofill field names, add handling of unsupported values. --- index.bs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 5e843431..cbd95366 100644 --- a/index.bs +++ b/index.bs @@ -190,6 +190,7 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: active window; url: document-sequences.html#nav-window text: alert; url: timers-and-user-prompts.html#dom-alert text: autofill; url: form-control-infrastructure.html#autofill + text: autofill detail tokens; url: form-control-infrastructure.html#autofill-detail-tokens text: close; url: document-sequences.html#close-a-top-level-traversable text: disabled; url: form-control-infrastructure.html#concept-fe-disabled text: File Upload state; url: input.html#file-upload-state-(type=file) @@ -11862,7 +11863,7 @@ on a particular form field using the provided fields. } autofill.Field = ( - name: text, + name: autofill.FieldName, value: text ) @@ -11906,6 +11907,9 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. If |element| is not a [=form-associated element=] or |element|'s [=form owner=] is null, return an [=error=] with [=error code=] [=invalid element state=]. +1. If |=user agent=| cannot autofill |fields|, return an [=error=] with + [=error code=] [=unsupported operation=]. + 1. The [=user agent=] should [=autofill=] |element| and |element|'s [=form owner=], while taking into account the contents of |fields|. @@ -11913,6 +11917,15 @@ The [=remote end steps=] with |session| and |command parameters| are: +#### The autofill.FieldName Type #### {#type-autofill-FieldName} + +
+   autofill.FieldName = text;
+
+ +The autofill.FieldName defines the valid names for |fields| to be autofilled. +Valid names are defined in [=autofill detail tokens=]. + # Patches to Other Specifications # {#patches} This specification requires some changes to external specifications to provide the necessary From 65699ab35454bb735c672c668efc43951e747847 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 14 Jun 2024 15:00:49 +0200 Subject: [PATCH 09/19] Remove user agent linking --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index cbd95366..27ec639c 100644 --- a/index.bs +++ b/index.bs @@ -11907,10 +11907,10 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. If |element| is not a [=form-associated element=] or |element|'s [=form owner=] is null, return an [=error=] with [=error code=] [=invalid element state=]. -1. If |=user agent=| cannot autofill |fields|, return an [=error=] with +1. If user agent cannot autofill |fields|, return an [=error=] with [=error code=] [=unsupported operation=]. -1. The [=user agent=] should [=autofill=] |element| and |element|'s [=form +1. The user agent should [=autofill=] |element| and |element|'s [=form owner=], while taking into account the contents of |fields|. 1. Return [=success=] with data null. From da1efbff69a0454120f7ad7aa69fdc2a0af96a2a Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 14 Jun 2024 15:25:20 +0200 Subject: [PATCH 10/19] Fix bikeshed error by dropping |fields| reference --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 27ec639c..8a511059 100644 --- a/index.bs +++ b/index.bs @@ -11923,8 +11923,8 @@ The [=remote end steps=] with |session| and |command parameters| are: autofill.FieldName = text; -The autofill.FieldName defines the valid names for |fields| to be autofilled. -Valid names are defined in [=autofill detail tokens=]. +The autofill.FieldName is a token. Valid token values are defined in +[=autofill detail tokens=]. # Patches to Other Specifications # {#patches} From 4083e28aa8fbe4f838118a9aead3e12bb87e6c62 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 14 Jun 2024 15:27:29 +0200 Subject: [PATCH 11/19] style --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 8a511059..5a94c5b8 100644 --- a/index.bs +++ b/index.bs @@ -11924,7 +11924,7 @@ The [=remote end steps=] with |session| and |command parameters| are: The autofill.FieldName is a token. Valid token values are defined in -[=autofill detail tokens=]. +[=autofill detail tokens=]. # Patches to Other Specifications # {#patches} From 3fd3098b50ebba326534e0b793570d2f032549a6 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Fri, 14 Jun 2024 15:32:38 +0200 Subject: [PATCH 12/19] Fix cddl error --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 5a94c5b8..c12b589d 100644 --- a/index.bs +++ b/index.bs @@ -11851,7 +11851,7 @@ on a particular form field using the provided fields.
Command Type
-      autofill.Trigger = (
+      autofill.trigger = (
         method: "autofill.trigger",
         params: autofill.TriggerParameters
       )

From ec3b30bc7edf0fe2489b5f6eda5c2c81ede73976 Mon Sep 17 00:00:00 2001
From: Christian Indra 
Date: Tue, 18 Mar 2025 10:59:21 -0400
Subject: [PATCH 13/19] Update browser context to navigable

---
 index.bs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/index.bs b/index.bs
index c12b589d..0f8a4001 100644
--- a/index.bs
+++ b/index.bs
@@ -11880,13 +11880,13 @@ on a particular form field using the provided fields.
 
 The [=remote end steps=] with |session| and |command parameters| are:
 
-1. Let |context id| be the value of the context field of
+1. Let |navigable id| be the value of the navigable field of
    |command parameters|.
 
-1. Let |context| be the result of [=trying=] to [=get a browsing context=]
-   with |context id|.
+1. Let |navigable| be the result of [=trying=] to [=get a navigable=]
+    with |navigable id|.
 
-1. Let |document| be |context|'s [=active document=].
+1. Let |document| be |navigable|'s [=active document=].
 
 1. Let |environment settings| be the [=environment settings object=] whose
    [=relevant global object=]'s associated Document is

From 2b63c0e9a35aca58fb3922b3fa911b17ba7d3ed9 Mon Sep 17 00:00:00 2001
From: Christian Indra 
Date: Tue, 18 Mar 2025 10:59:32 -0400
Subject: [PATCH 14/19] Remove parts that cause build errors

---
 index.bs | 102 -------------------------------------------------------
 1 file changed, 102 deletions(-)

diff --git a/index.bs b/index.bs
index 0f8a4001..86cbc8fd 100644
--- a/index.bs
+++ b/index.bs
@@ -495,7 +495,6 @@ Event = {
 
 EventData = (
   BrowsingContextEvent //
-  InputEvent //
   LogEvent //
   NetworkEvent //
   ScriptEvent
@@ -11441,13 +11440,6 @@ InputCommand = (
 
 [=local end definition=]
 
-
-
-InputEvent = (
-  input.FileDialogOpened
-)
-
- ### Types ### {#module-input-types} #### input.ElementOrigin #### {#type-input-origin} @@ -11926,100 +11918,6 @@ The [=remote end steps=] with |session| and |command parameters| are: The autofill.FieldName is a token. Valid token values are defined in [=autofill detail tokens=]. -# Patches to Other Specifications # {#patches} - -This specification requires some changes to external specifications to provide the necessary -integration points. It is assumed that these patches will be committed to the other specifications -as part of the standards process. - -## HTML ## {#patches-html} - -The [=a browsing context is discarded=] algorithm is modified to read as follows: -### Events ### {#module-input-events} - -#### The input.fileDialogOpened Event #### {#event-input-fileDialogOpened} - -
-
Event Type
-
-
-         input.FileDialogOpened = (
-            method: "input.fileDialogOpened",
-            params: input.FileDialogInfo
-         )
-
-         input.FileDialogInfo = {
-            context: browsingContext.BrowsingContext,
-            ? element: script.SharedReference,
-            multiple: bool,
-         }
-      
-
-
- -
-The [=remote end event trigger=] is the -WebDriver BiDi file dialog opened steps, given |element| and optionally -|file picker options| (default: null): - -1. Let |navigable| be the |element|'s [=node document=]'s [=/navigable=]. - -1. Let |navigable id| be |navigable|'s [=navigable id=]. - -1. Let |multiple| be false. - -1. If |element| is not null and |element|'s <{input/multiple}> attribute is set, - set |multiple| to true. - -1. If |file picker options| is not null: - - 1. If |file picker options|["multiple"] is true, set |multiple| to - true. - -1. Let |related navigables| be a [=/set=] containing |navigable|. - -1. For each |session| in the [=set of sessions for which an event is enabled=] given - "input.fileDialogOpened" and |related navigables|: - - 1. Let |params| be a [=/map=] matching the input.FileDialogInfo - production with the context field set to |navigable id| and - multiple field set to |multiple|. - - 1. If |element| is not null: - - 1. Let |shared id| be [=get shared id for a node=] with |element| and |session|. - - 1. Set |params|["element"] to |shared id|. - - 1. Let |body| be a [=/map=] matching the input.fileDialogOpened - production, with the params field set to |params|. - - 1. [=Emit an event=] with |session| and |body|. - -1. Let |dismissed| be false. - -1. For each |session| in [=active BiDi sessions=]: - - 1. Let |user prompt handler| be |session|'s [=user prompt handler=]. - - 1. If |user prompt handler| is not null: - - 1. Assert |user prompt handler| is a [=/map=]. - - 1. If |user prompt handler| [=map/contains=] "file": - - 1. If |user prompt handler|["file"] is not equal to - "ignore", set |dismissed| to true. - - 1. Otherwise if |user prompt handler| [=map/contains=] "default" and - |user prompt handler|["default"] is not equal to - "ignore", set |dismissed| to true. - -1. Return |dismissed|. - -
- - ## The webExtension Module ## {#module-webExtension} The webExtension module contains functionality for From 7737ae25198764514b52d661410e1f2d999a5184 Mon Sep 17 00:00:00 2001 From: Christian Indra Date: Tue, 18 Mar 2025 13:12:08 -0400 Subject: [PATCH 15/19] Change to single field for trigger function --- index.bs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 86cbc8fd..ff06390f 100644 --- a/index.bs +++ b/index.bs @@ -11851,13 +11851,13 @@ on a particular form field using the provided fields. autofill.TriggerParameters = { context: browsingContext.BrowsingContext, element: script.SharedReference, - fields: [*autofill.Field] + field: autofill.Field } - autofill.Field = ( + autofill.Field = { name: autofill.FieldName, value: text - ) + }
Return Type
@@ -11893,17 +11893,17 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. Let |element| be the result of [=trying=] to [=deserialize remote reference=] with the |element id|, |realm|, and |session|. -1. Let |fields| be the value of the fields field of |command +1. Let |field| be the value of the field field of |command parameters|. 1. If |element| is not a [=form-associated element=] or |element|'s [=form owner=] is null, return an [=error=] with [=error code=] [=invalid element state=]. -1. If user agent cannot autofill |fields|, return an [=error=] with +1. If user agent cannot autofill |field|, return an [=error=] with [=error code=] [=unsupported operation=]. 1. The user agent should [=autofill=] |element| and |element|'s [=form - owner=], while taking into account the contents of |fields|. + owner=], while taking into account the contents of |field|. 1. Return [=success=] with data null. From caaf0147c92442e1eab4aa6c94b122a0eb50165c Mon Sep 17 00:00:00 2001 From: Christian Indra Date: Tue, 18 Mar 2025 13:22:35 -0400 Subject: [PATCH 16/19] Revert "Remove parts that cause build errors" This reverts commit 2b63c0e9a35aca58fb3922b3fa911b17ba7d3ed9. --- index.bs | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/index.bs b/index.bs index ff06390f..67afb748 100644 --- a/index.bs +++ b/index.bs @@ -495,6 +495,7 @@ Event = { EventData = ( BrowsingContextEvent // + InputEvent // LogEvent // NetworkEvent // ScriptEvent @@ -11440,6 +11441,13 @@ InputCommand = ( [=local end definition=] +
+
+InputEvent = (
+  input.FileDialogOpened
+)
+
+ ### Types ### {#module-input-types} #### input.ElementOrigin #### {#type-input-origin} @@ -11918,6 +11926,100 @@ The [=remote end steps=] with |session| and |command parameters| are: The autofill.FieldName is a token. Valid token values are defined in [=autofill detail tokens=]. +# Patches to Other Specifications # {#patches} + +This specification requires some changes to external specifications to provide the necessary +integration points. It is assumed that these patches will be committed to the other specifications +as part of the standards process. + +## HTML ## {#patches-html} + +The [=a browsing context is discarded=] algorithm is modified to read as follows: +### Events ### {#module-input-events} + +#### The input.fileDialogOpened Event #### {#event-input-fileDialogOpened} + +
+
Event Type
+
+
+         input.FileDialogOpened = (
+            method: "input.fileDialogOpened",
+            params: input.FileDialogInfo
+         )
+
+         input.FileDialogInfo = {
+            context: browsingContext.BrowsingContext,
+            ? element: script.SharedReference,
+            multiple: bool,
+         }
+      
+
+
+ +
+The [=remote end event trigger=] is the +WebDriver BiDi file dialog opened steps, given |element| and optionally +|file picker options| (default: null): + +1. Let |navigable| be the |element|'s [=node document=]'s [=/navigable=]. + +1. Let |navigable id| be |navigable|'s [=navigable id=]. + +1. Let |multiple| be false. + +1. If |element| is not null and |element|'s <{input/multiple}> attribute is set, + set |multiple| to true. + +1. If |file picker options| is not null: + + 1. If |file picker options|["multiple"] is true, set |multiple| to + true. + +1. Let |related navigables| be a [=/set=] containing |navigable|. + +1. For each |session| in the [=set of sessions for which an event is enabled=] given + "input.fileDialogOpened" and |related navigables|: + + 1. Let |params| be a [=/map=] matching the input.FileDialogInfo + production with the context field set to |navigable id| and + multiple field set to |multiple|. + + 1. If |element| is not null: + + 1. Let |shared id| be [=get shared id for a node=] with |element| and |session|. + + 1. Set |params|["element"] to |shared id|. + + 1. Let |body| be a [=/map=] matching the input.fileDialogOpened + production, with the params field set to |params|. + + 1. [=Emit an event=] with |session| and |body|. + +1. Let |dismissed| be false. + +1. For each |session| in [=active BiDi sessions=]: + + 1. Let |user prompt handler| be |session|'s [=user prompt handler=]. + + 1. If |user prompt handler| is not null: + + 1. Assert |user prompt handler| is a [=/map=]. + + 1. If |user prompt handler| [=map/contains=] "file": + + 1. If |user prompt handler|["file"] is not equal to + "ignore", set |dismissed| to true. + + 1. Otherwise if |user prompt handler| [=map/contains=] "default" and + |user prompt handler|["default"] is not equal to + "ignore", set |dismissed| to true. + +1. Return |dismissed|. + +
+ + ## The webExtension Module ## {#module-webExtension} The webExtension module contains functionality for From e80f3074ede6ce7f12cf2cee7479fe127984e819 Mon Sep 17 00:00:00 2001 From: Christian Indra Date: Tue, 18 Mar 2025 13:25:55 -0400 Subject: [PATCH 17/19] Remove broken spec code --- index.bs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/index.bs b/index.bs index 67afb748..bf642b61 100644 --- a/index.bs +++ b/index.bs @@ -11926,15 +11926,6 @@ The [=remote end steps=] with |session| and |command parameters| are: The autofill.FieldName is a token. Valid token values are defined in [=autofill detail tokens=]. -# Patches to Other Specifications # {#patches} - -This specification requires some changes to external specifications to provide the necessary -integration points. It is assumed that these patches will be committed to the other specifications -as part of the standards process. - -## HTML ## {#patches-html} - -The [=a browsing context is discarded=] algorithm is modified to read as follows: ### Events ### {#module-input-events} #### The input.fileDialogOpened Event #### {#event-input-fileDialogOpened} From f33441e4ca38461b29726110becbb660cdca69aa Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Thu, 20 Mar 2025 15:22:41 +0000 Subject: [PATCH 18/19] Add setAddress --- index.bs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index bf642b61..d1bde96c 100644 --- a/index.bs +++ b/index.bs @@ -11836,7 +11836,8 @@ The autofill module contains functionality for tri
 
 AutofillCommand = (
-  autofill.trigger
+  autofill.trigger,
+  autofill.setAddress
 )
 
@@ -11866,6 +11867,16 @@ on a particular form field using the provided fields. name: autofill.FieldName, value: text } + + autofill.setAddress = ( + method: "autofill.setAddress", + params: autofill.AddressParameters + ) + + autofill.AddressParameters = { + context: browsingContext.BrowsingContext, + fields: [* autofill.Field] + }
Return Type
From caeff544b599f2b561de9ddaf69c15e8b79af582 Mon Sep 17 00:00:00 2001 From: Christian Indra Date: Thu, 20 Mar 2025 11:45:02 -0400 Subject: [PATCH 19/19] Fix autofill type generation --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index d1bde96c..86a0d983 100644 --- a/index.bs +++ b/index.bs @@ -11836,7 +11836,7 @@ The autofill module contains functionality for tri
 
 AutofillCommand = (
-  autofill.trigger,
+  autofill.trigger //
   autofill.setAddress
 )