From eda8a810142dbe49a30381c83c47dd4bb2fdc7d3 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Mon, 6 May 2024 21:42:06 +0200 Subject: [PATCH 01/34] Add an autofill module --- index.bs | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/index.bs b/index.bs index 91f93bab..5a556596 100644 --- a/index.bs +++ b/index.bs @@ -13616,6 +13616,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 6b787ce21b575b1a50c339aabc565e68cb9675cd Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Mon, 6 May 2024 22:10:53 +0200 Subject: [PATCH 02/34] Fixed up some bikeshed defs --- index.bs | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index 5a556596..42f755da 100644 --- a/index.bs +++ b/index.bs @@ -329,6 +329,20 @@ spec: RFC9110; urlPrefix: https://httpwg.org/specs/rfc9110.html spec: STREAMS; urlPrefix: https://streams.spec.whatwg.org/ type: dfn text: ReadableStream; url: #readablestream +spec:infra; urlPrefix: https://infra.spec.whatwg.org/ + type:dfn; + text:user agent + + +
+{
+    "SAME-SITE-COOKIES": {
+        "authors": ["Mike West", "Mark Goodwin"],
+        "href": "https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-same-site",
+        "publisher": "IETF",
+        "title": "Same-Site Cookies"
+    }
+}