From bcb597fb9af0c93753b4286998e028bd323491fd Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Tue, 8 Mar 2022 20:57:44 +0100 Subject: [PATCH 1/3] Serialization --- index.html | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index cf9b8f6..d2a2d37 100644 --- a/index.html +++ b/index.html @@ -19,6 +19,15 @@

Abstract

a First Public Working Draft.
+
+

Terminology

+

+ The terms + serializable objects, [= serialization steps =], and [= deserialization steps =] are defined in [[!HTML]]. +

+

Definitions

@@ -147,12 +156,31 @@

CropTarget Definition

purpose is to be handed to {{BrowserCaptureMediaStreamTrack/cropTo}} as input.

-          [Exposed = Window]
+          [Exposed = Window, Serializable]
           interface CropTarget {
             // Intentionally empty; just an opaque identifier.
           };
         
+ +

+ {{CropTarget}} objects are [= serializable objects =] [[!HTML]]. Their [= serialization + steps =], given value and serialized, are: +

+
    +
  1. Make serialized a randomly generated, globally unique {{DOMString}}.
  2. +
+

+ Their deserialization steps, given serialized and value, are: +

+
    +
  1. + If serialized was previously produced by serializing a {{CropTarget}} in the + current top-level [=browsing context=], or in any of its descendent [=browsing + contexts=], then set value to that {{CropTarget}}. Otherwise, set + value to {{undefined}}. +
  2. +

MediaDevices.produceCropTarget

From 83a667510782e588e444bb868203f8d5db9880dc Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Mon, 14 Mar 2022 18:49:05 +0100 Subject: [PATCH 2/3] rm fixme --- index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index d2a2d37..3eea636 100644 --- a/index.html +++ b/index.html @@ -23,9 +23,8 @@

Abstract

Terminology

The terms - serializable objects, [= serialization steps =], and [= deserialization steps =] are defined in [[!HTML]]. + serializable objects, + [= serialization steps =], and [= deserialization steps =] are defined in [[!HTML]].

From 545cc380e546f6acdbecaa9c793f5d0258957bd8 Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Fri, 18 Mar 2022 17:04:27 +0100 Subject: [PATCH 3/3] Add internal slot --- index.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 3eea636..fdef96f 100644 --- a/index.html +++ b/index.html @@ -167,17 +167,25 @@

CropTarget Definition

steps =], given value and serialized, are:

    -
  1. Make serialized a randomly generated, globally unique {{DOMString}}.
  2. +
  3. + Set serialized.[[\Data]] a randomly generated, globally unique {{DOMString}}. +

Their deserialization steps, given serialized and value, are:

  1. - If serialized was previously produced by serializing a {{CropTarget}} in the - current top-level [=browsing context=], or in any of its descendent [=browsing - contexts=], then set value to that {{CropTarget}}. Otherwise, set - value to {{undefined}}. + Compare serialized.[[\Data]] against a record of all {{CropTargets}} produced + and serialized thus far in the current top-level [=browsing context=], or in any of its + descendent [=browsing contexts=]. +
      +
    1. + If serialized.[[\Data]] was obtained by serializing previous + {{CropTarget}}, then set value to an equivalent {{CropTarget}}. +
    2. +
    3. Otherwise, set value to {{undefined}}.
    4. +