script: Implement CSS.registerProperty (#38682)

The implementation is mostly equivalent to
https://searchfox.org/mozilla-central/source/servo/ports/geckolib/glue.rs#9480.

Testing: New web platform tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-08-14 15:34:02 +02:00 committed by GitHub
parent 3a0e8fefde
commit 43da933247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 185 additions and 46 deletions

View file

@ -1,5 +1,4 @@
[attr-security.html]
expected: ERROR
[CSS Values and Units Test: attr() security limitations]
expected: FAIL
@ -74,3 +73,24 @@
['--x: image-set(var(--some-string-list))' with data-foo="https://does-not-exist.test/404.png"]
expected: FAIL
['--registered-color: attr(data-foo type(<color>))' with data-foo="blue"]
expected: FAIL
['--x: image-set(var(--some-other-url))' with data-foo="https://does-not-exist.test/404.png"]
expected: FAIL
['--x: image-set(if(style(--true): attr(data-foo);))' with data-foo="https://does-not-exist.test/404.png"]
expected: FAIL
['background-image: image-set(\n if(style(--true): url(https://does-not-exist-2.test/404.png);\n else: attr(data-foo);))' with data-foo="https://does-not-exist-2.test/404.png"]
expected: FAIL
['background-image: image-set(if(style(--true): url(https://does-not-exist.test/404.png);\n style(--condition-val): url(https://does-not-exist.test/404.png);\n else: url(https://does-not-exist.test/404.png);))' with data-foo="attr(data-foo type(*))"]
expected: FAIL
['--x: image-set(if(style(--condition-val: if(style(--true): attr(data-foo type(*));)): url(https://does-not-exist.test/404.png);))' with data-foo="3"]
expected: FAIL
['--x: image-set(if(style(--condition-val >= attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3"]
expected: FAIL