script: Implement deprecated CSSStyleSheet members (#36313)

Implements `rules`, `addRule()` and `removeRule()` for `CSSStyleSheet`.
https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members

This is part of #36162

Testing:
- `/css/css-cascade/at-scope-parsing.html`
- `/css/css-conditional/at-supports-whitespace.html`
- `/css/css-nesting/invalidation-004.html`
- `/css/css-nesting/parsing.html`
- `/css/css-nesting/serialize-group-rules-with-decls.html`
- `/css/css-syntax/custom-property-rule-ambiguity.html`
- `/css/css-syntax/invalid-nested-rules.html`
- `/css/css-syntax/trailing-braces.html`
- `/css/css-syntax/var-with-blocks.html`
- `/css/css-transitions/parsing/starting-style-parsing.html`
- `/css/cssom/CSSStyleSheet.html`
- `/css/cssom/idlharness.html`
- `/css/cssom/insertRule-across-context.html`

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-04-03 08:56:47 -07:00 committed by GitHub
parent 9d6e1f67fb
commit f29c182929
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 57 additions and 309 deletions

View file

@ -76,87 +76,3 @@
[@scope (> &) to (>>) is valid]
expected: FAIL
[@scope div is not valid]
expected: FAIL
[@scope (.a) unknown (.c) is not valid]
expected: FAIL
[@scope (.a) to unknown (.c) is not valid]
expected: FAIL
[@scope (.a) 1px (.c) is not valid]
expected: FAIL
[@scope (.a) to unknown(c) is not valid]
expected: FAIL
[@scope unknown(.a) is not valid]
expected: FAIL
[@scope 1px is not valid]
expected: FAIL
[@scope creep is not valid]
expected: FAIL
[@scope ))) is not valid]
expected: FAIL
[@scope ( is not valid]
expected: FAIL
[@scope ( {} is not valid]
expected: FAIL
[@scope to is not valid]
expected: FAIL
[@scope } is not valid]
expected: FAIL
[@scope (.a is not valid]
expected: FAIL
[@scope (.a to (.b) is not valid]
expected: FAIL
[@scope ( to (.b) is not valid]
expected: FAIL
[@scope (.a) from (.c) is not valid]
expected: FAIL
[@scope (.c <> .d) is not valid]
expected: FAIL
[@scope (.a, .c <> .d) is not valid]
expected: FAIL
[@scope (.a <> .b, .c) is not valid]
expected: FAIL
[@scope (div::before) is not valid]
expected: FAIL
[@scope (div::after) is not valid]
expected: FAIL
[@scope (slotted(div)) is not valid]
expected: FAIL
[@scope (.a) to (div::before) is not valid]
expected: FAIL
[@scope (> &) to (>>) is not valid]
expected: FAIL
[@scope () is not valid]
expected: FAIL
[@scope to () is not valid]
expected: FAIL
[@scope () to () is not valid]
expected: FAIL