script: Support custom element states (#38564)

Also adds support for `:state`.

Testing: Covered by existing tests

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-08-27 19:25:16 +02:00 committed by GitHub
parent dcd25072d3
commit 04dd74dddb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 209 additions and 152 deletions

View file

@ -1,12 +1,3 @@
[ElementInternals-states.html]
[CustomStateSet behavior of ElementInternals.states: Initial state]
expected: FAIL
[CustomStateSet behavior of ElementInternals.states: Exceptions]
expected: FAIL
[CustomStateSet behavior of ElementInternals.states: Modifications]
expected: FAIL
[Updating a CustomStateSet while iterating it should work]
expected: FAIL

View file

@ -1,3 +0,0 @@
[custom-state-set-strong-ref.html]
[customstateset doesn't crash after GC on detached node]
expected: FAIL

View file

@ -1,10 +1,6 @@
[state-css-selector-nth-of.html]
expected: ERROR
[state selector has influence on nth-of when state is applied]
expected: FAIL
[state selector only applies on given ident]
expected: NOTRUN
[style is invalided on clear()]
expected: NOTRUN
expected: FAIL

View file

@ -1,30 +1,6 @@
[state-css-selector.html]
[state selector has no influence when state is not applied]
expected: FAIL
[state selector has no influence on sibling selectors when not applied]
expected: FAIL
[state selector has influence when state is applied]
expected: FAIL
[state selector influences siblings when state is applied]
expected: FAIL
[state selector influences has() when state is applied]
expected: FAIL
[state selector only applies on given ident]
expected: FAIL
[state selector only applies to siblings on given ident]
expected: FAIL
[state selector only applies to has() on given ident]
expected: FAIL
[states added multiple times counts as one]
expected: FAIL
[style is invalided on clear()]
expected: FAIL

View file

@ -1,18 +1,3 @@
[state-pseudo-class.html]
[:state() parsing passes]
expected: FAIL
[:state(foo) serialization]
expected: FAIL
[:state(foo) in simple cases]
expected: FAIL
[:state(foo) and other pseudo classes]
expected: FAIL
[:state(foo) and ::part()]
expected: FAIL
[:state(foo) and :host()]
expected: FAIL