Bug 1742880 [wpt PR 31737] - Convert adoptedStyleSheets to use ObservableArray, a...
commit38820f1189925ca9ea126d3af3fd30c4615aea0b
authorMason Freed <masonf@chromium.org>
Mon, 20 Dec 2021 22:08:40 +0000 (20 22:08 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 23 Dec 2021 14:24:37 +0000 (23 14:24 +0000)
tree4425ce9e1d502128718bf31a69a5d45943d83d67
parenta8e70382f72f828c0ee1bc9a5562d9b2cec0f806
Bug 1742880 [wpt PR 31737] - Convert adoptedStyleSheets to use ObservableArray, a=testonly

Automatic update from web-platform-tests
Convert adoptedStyleSheets to use ObservableArray

This CL converts adoptedStyleSheets from a FrozenArray to the
new ObservableArray. This is per the new spec [1]. It should be
backwards compatible, and will allow mutation of adoptedStyleSheets
in place using regular array methods like .push():

  document.adoptedStyleSheets = [sheet1, sheet2];
  document.adoptedStyleSheets.push(sheet);
  ...etc...

Intent to ship:
https://groups.google.com/a/chromium.org/g/blink-dev/c/8p7QvGn3Ezo

[1] https://drafts.csswg.org/cssom/#extensions-to-the-document-or-shadow-root-interface

Bug: 1201744
Bug: 1236777
Change-Id: Iacbf66a38c0abd477b5628224c97bec9f8a317e4
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3270424
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#950808}

--

wpt-commits: 2889c3f819d785f853858029984fd1f1fcc14e12
wpt-pr: 31737
testing/web-platform/tests/css/cssom/CSSStyleSheet-constructable-concat-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/cssom/CSSStyleSheet-constructable-concat.html [new file with mode: 0644]
testing/web-platform/tests/css/cssom/adoptedstylesheets-observablearray.html [new file with mode: 0644]