script: Implement CSSStyleSheet constructor (#36521)

https://drafts.csswg.org/cssom/#dom-cssstylesheet-cssstylesheet

Testing: covered by WPT
This is part of #36162

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-04-15 07:05:13 -07:00 committed by GitHub
parent 372fd04b23
commit 10f6f50c61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 127 additions and 38 deletions

View file

@ -5,9 +5,6 @@
[new CSSStyleSheet produces empty CSSStyleSheet]
expected: FAIL
[title can be set in the CSSStyleSheet constructor]
expected: FAIL
[CSSStyleSheet.replace produces Promise<CSSStyleSheet>]
expected: FAIL
@ -56,9 +53,6 @@
[Adopted sheets are ordered after non-adopted sheets in the document]
expected: FAIL
[Inserting an @import rule through insertRule on a constructed stylesheet throws an exception]
expected: FAIL
[CSSStyleSheet.replaceSync should not trigger any loads from @import rules]
expected: FAIL
@ -74,21 +68,12 @@
[CSSStyleSheet.replace does not reject on failed imports]
expected: FAIL
[Cloning a shadow host will not clone shadow root, and also adoptedStyleSheets]
expected: FAIL
[Importing a shadow host will not copy shadow root, and also adoptedStyleSheets]
expected: FAIL
[Adopting a shadow host will empty adoptedStyleSheets if adopting to a different document]
expected: FAIL
[Adopting a shadow host's ancestor will empty adoptedStyleSheets if adopting to a different document]
expected: FAIL
[Forcing a style update after adding an adopted stylesheet on a disconnected shadow root should not crash.]
expected: FAIL
[Modifying an adopted stylesheet on a disconnected shadow root should not crash.]
expected: FAIL