script: Support different colorspaces for <input type=color> (#42279)

This change adds support for the `colorspace` attribute on color inputs
and implements serialization of the input value accordingly.

The color picker from servoshell doesn't yet support non-rgb colorspaces
(and neither does the embedding API), so we convert to and from rgb when
communicating with the embedder.

Testing: New tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker
2026-02-02 07:21:41 +01:00
committed by GitHub
parent 91ee834195
commit 83bf475370
5 changed files with 95 additions and 261 deletions

View File

@@ -18,6 +18,7 @@ interface HTMLInputElement : HTMLElement {
[CEReactions]
attribute boolean defaultChecked;
attribute boolean checked;
[CEReactions] attribute DOMString colorSpace;
[CEReactions]
attribute DOMString dirName;
[CEReactions]