diff --git a/index.bs b/index.bs index 6468441..0b9abdc 100644 --- a/index.bs +++ b/index.bs @@ -50,6 +50,7 @@ table td, table th {
@@ -1063,7 +1064,7 @@ interface MediaMetadata {
   attribute DOMString title;
   attribute DOMString artist;
   attribute DOMString album;
-  attribute FrozenArray<MediaImage> artwork;
+  attribute FrozenArray<object> artwork;
   [SameObject] readonly attribute FrozenArray<ChapterInformation> chapterInfo;
 };
 
@@ -1094,8 +1095,11 @@ dictionary MediaMetadataInit {
 

- A {{MediaMetadata}} has an associated list of artwork - images. + A {{MediaMetadata}} has an associated sequence of artwork images, which is a sequence of type + {{MediaImage}}. A {{MediaMetadata}} also has has an associated + converted artwork images which is initially undefined.

@@ -1164,7 +1168,8 @@ dictionary MediaMetadataInit {

When the convert artwork algorithm with input parameter is -invoked, the user agent MUST run the following steps: +invoked, where the input is a sequence of type {{MediaImage}}, the +user agent MUST run the following steps:
  1. Let output be an empty list of type {{MediaImage}}. @@ -1227,52 +1232,65 @@ invoked, the user agent MUST run the following steps:

    The artwork attribute reflects the {{MediaMetadata}}'s artwork - images. On getting, it MUST return the result of the following steps: + images. On getting, it MUST run the following steps:

    1. - Let frozenArtwork be an empty list of type {{MediaImage}}. -
    2. -
    3. - For each entry in the {{MediaMetadata}}'s artwork images, perform the following steps: + If the {{MediaMetadata}}'s converted artwork images is + undefined, run the following steps:
      1. - Let image be a new {{MediaImage}}. -
      2. -
      3. - Set image's {{MediaImage/src}} to entry's - {{MediaImage/src}}. -
      4. -
      5. - Set image's {{MediaImage/sizes}} to entry's - {{MediaImage/sizes}}. + Let frozenArtwork be a JavaScript Array value.
      6. - Set image's {{MediaImage/type}} to entry's - {{MediaImage/type}}. + For each entry in the {{MediaMetadata}}'s artwork images, perform the following steps: +
          +
        1. + Let image be the result of [=converted to a JavaScript + value|converting to a JavaScript object=] entry. +
        2. +
        3. + Perform [=!=] SetIntegrityLevel(image, + "frozen"), to prevent accidental mutation by scripts. +
        4. +
        5. + Push image to frozenArtwork. +
        6. +
      7. -
      8. - Call {{Object/freeze(O)}} on image, to prevent accidental - mutation by scripts. + Perform [=!=] SetIntegrityLevel(frozenArtwork, + "frozen").
      9. - Append image to frozenArtwork. + Set the {{MediaMetadata}}'s converted artwork images to + frozenArtwork.
    4. - Create a frozen array from frozenArtwork. + Return the {{MediaMetadata}}'s converted artwork images. +
    5. +
    + On setting, it MUST run the following steps with value being the + new value being set: +
      +
    1. + Let convertedArtwork be the result of [=converted to an IDL + value|converting=] value to a sequence of type {{MediaImage}}. +
    2. +
    3. + Run convert artwork algorithm with convertedArtwork, and + set the {{MediaMetadata}}'s artwork images as + the result if it succeeds. +
    4. +
    5. + Set the {{MediaMetadata}}'s converted artwork images to + undefined.
    - On setting, it MUST run the - convert artwork algorithm with the new value as input, and - set the {{MediaMetadata}}'s artwork images as the - result if it succeeded.

    @@ -1369,7 +1387,8 @@ dictionary ChapterInformationInit {

  2. Let {{ChapterInformationInit/artwork}} be the result of running the - convert artwork algorithm. + convert artwork algorithm with init's + {{ChapterInformation/artwork}} as input.
  3. Set chapterInfo's artwork