Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance <input type=color> with alpha and colorspace=display-p3 #10456

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

annevk
Copy link
Member

@annevk annevk commented Jul 3, 2024

The new alpha and colorspace attributes give it parity with the 2D canvas API.

As part of this change we do away with the "simple color" concept as that has been replaced by CSS colors now.

Fixes #3400.


WebKit can contribute tests as part of implementing this feature.

It would be great to get some help from @svgeesus @tabatkins and @LeaVerou on resolving #8917 so HTML can clearly link a way to serialize CSS color values (for the Hexadecimal state we can continue to maintain that ourselves). I think we have a plan there, but let me know if there's anything still unclear (prolly best in that issue).

(See WHATWG Working Mode: Changes for more details.)


/common-microsyntaxes.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/input.html ( diff )
/rendering.html ( diff )

@annevk annevk added addition/proposal New features or enhancements topic: forms impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation agenda+ To be discussed at a triage meeting labels Jul 3, 2024
@annevk annevk force-pushed the annevk/color-input-improvements branch from a48f1e6 to 1ea2ca0 Compare July 3, 2024 14:55
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@past past removed the agenda+ To be discussed at a triage meeting label Jul 11, 2024
@annevk
Copy link
Member Author

annevk commented Jul 11, 2024

@domenic observed that for <input type=color alpha> we do not have to set the proposed "HTMLCompatible" serialization parameter to true and could instead use the modern serialization. Which would mean instead of rgba(...) (that 2D canvas requires as discussed in #8917) you would get color(srgb ...) presumably. It would still be limited to 8-bits per color component, but it seems reasonable to me.

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorially looking pretty good, although some questions in #3400 (comment) seem interesting as an uninformed-about-color person.

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@josepharhar
Copy link
Contributor

I think it would take us some time to upgrade the color picker popup in chromium (thanks @lukewarlow for mentioning that DevTools has a better one), but if we can just support serialization etc. in IDLs based on these new attributes in the meantime based on WPTs then that sounds good to me.

@lukewarlow
Copy link
Member

I think it would be unfortunate to support the alpha attribute but not actually allow the user to select an alpha value? But not fully supporting picking display P3 but supporting the serialisation seems like it could be more acceptable?

@josepharhar
Copy link
Contributor

Yeah I suppose we could easily and quickly add alpha, then hopefully follow up with display p3 later

@annevk
Copy link
Member Author

annevk commented Sep 19, 2024

I believe I have addressed the questions in #3400 and this is now rebased on top of #8917 so it's using all the latest terms. Marking agenda+ to double check on implementer interest, but if that can be provided out-of-band that would be swell as we've already discussed this a number of times.

Copy link

@svgeesus svgeesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link

@svgeesus svgeesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall

source Outdated
<span data-x="named color">named colors</span>, then return the <span>simple color</span>
corresponding to that keyword. <ref>CSSCOLOR</ref></p>
<p>If <var>input</var> is an <span>ASCII case-insensitive</span> match for one of the <span
data-x="named color">named colors</span>, then return the CSS color corresponding to that

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@annevk annevk Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that matches how we talk about "CSS color" in HTML. What we mean here is the parsed representation, the internal object if you will, not the syntax.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay. Perhaps the <color> type from CSS Typed OM, then?

https://drafts.css-houdini.org/css-typed-om-1/#reify-color

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@josepharhar
Copy link
Contributor

I just talked to @mfreed7 @dbaron and @fserb, and we think this is good, so this has chromium implementer interest.

@lukewarlow
Copy link
Member

lukewarlow commented Sep 28, 2024

Having read through the spec one bit still feels slightly ambiguous to me, but this could just be that I'm missing something.

It seems that <input type="color" alpha> should serialize to something like color(srgb 0 0 0 / 1) (based on the description for the attribute) but https://whatpr.org/html/10456/input.html#serialize-a-color-well-control-color just calls to https://drafts.csswg.org/css-color/#serializing-color-values I read this to go down the serialization of sRGB values path, which would result in rgb(0, 0, 0)

Is there an obvious reason in the spec that it uses https://drafts.csswg.org/css-color/#serializing-color-function-values instead?

annevk added a commit to annevk/WebKit that referenced this pull request Oct 10, 2024
…ttributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

A future change will adjust the UI accordingly and add the necessary
tests.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
@past past removed the agenda+ To be discussed at a triage meeting label Oct 10, 2024
annevk added a commit to annevk/WebKit that referenced this pull request Oct 11, 2024
…ttributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly and add the necessary
tests.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
annevk added a commit to annevk/WebKit that referenced this pull request Oct 11, 2024
…ttributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly and add the necessary
tests.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
annevk added a commit to annevk/WebKit that referenced this pull request Oct 11, 2024
…ttributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly and add the necessary
tests.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
annevk added a commit to web-platform-tests/wpt that referenced this pull request Oct 15, 2024
annevk added a commit to annevk/WebKit that referenced this pull request Oct 15, 2024
…attributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly.

Tests are upstreamed here:
web-platform-tests/wpt#48630

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.js: Added.
(test):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.html.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.js: Added.
(const.assert_colors.set_up_fuzzy_color_test):
(forEach):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attributeChanged):
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
annevk added a commit to annevk/WebKit that referenced this pull request Oct 16, 2024
…attributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly.

Tests are upstreamed here:
web-platform-tests/wpt#48630

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.js: Added.
(test):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.html.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.js: Added.
(const.assert_colors.set_up_fuzzy_color_test):
(forEach):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attributeChanged):
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
annevk added a commit to annevk/WebKit that referenced this pull request Oct 16, 2024
…attributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by NOBODY (OOPS!).

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly.

Tests are upstreamed here:
web-platform-tests/wpt#48630

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.js: Added.
(test):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.html.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.js: Added.
(const.assert_colors.set_up_fuzzy_color_test):
(forEach):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attributeChanged):
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:
The new alpha and colorspace attributes give it parity with the 2D
canvas API.

As part of this change we do away with the "simple color" concept as
that has been replaced by CSS colors now.

Fixes #3400.
@annevk annevk force-pushed the annevk/color-input-improvements branch from 264ac8e to 298db78 Compare October 16, 2024 20:06
@annevk
Copy link
Member Author

annevk commented Oct 16, 2024

Luke's issue has been discussed in w3c/csswg-drafts#11008 and I landed a minor fix for it in this PR. Tests are up as well now. I plan on landing this PR Monday.

webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request Oct 17, 2024
…attributes

https://bugs.webkit.org/show_bug.cgi?id=281213
rdar://137663314

Reviewed by Sam Weinig.

Add the necessary infrastructure for
whatwg/html#10456. In particular:

- Support the alpha and colorspace attributes behind a preference.
- When the preference is enabled vastly expand the CSS color parsing
  and serialization capabilities of <input type=color>.

Future changes will adjust the UI accordingly.

Tests are upstreamed here:
web-platform-tests/wpt#48630

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-attributes.window.js: Added.
(test):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.html.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/color.window.js: Added.
(const.assert_colors.set_up_fuzzy_color_test):
(forEach):
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/html/ColorInputType.cpp:
(WebCore::colorParsingParameters):
(WebCore::parseColorValue):
(WebCore::serializeColorValue):
(WebCore::ColorInputType::fallbackValue const):
(WebCore::ColorInputType::sanitizeValue const):
(WebCore::ColorInputType::valueAsColor const):
(WebCore::ColorInputType::typeMismatchFor const):
(WebCore::ColorInputType::didChooseColor):
(WebCore::ColorInputType::suggestedColors const):
(WebCore::ColorInputType::selectColor):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attributeChanged):
(WebCore::HTMLInputElement::alpha):
(WebCore::HTMLInputElement::colorSpace):
(WebCore::HTMLInputElement::setColorSpace):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebCore/html/HTMLInputElement.idl:

Canonical link: https://commits.webkit.org/285322@main
annevk added a commit to web-platform-tests/wpt that referenced this pull request Oct 21, 2024
@annevk annevk merged commit 19faae7 into main Oct 21, 2024
2 checks passed
@annevk annevk deleted the annevk/color-input-improvements branch October 21, 2024 15:22
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 22, 2024
…testonly

Automatic update from web-platform-tests
HTML: alpha and colorspace attribute

Context: whatwg/html#10456.
--

wpt-commits: 05ae498a46fd05d85b867fb1457df94a10dc4bb4
wpt-pr: 48630
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Oct 23, 2024
…testonly

Automatic update from web-platform-tests
HTML: alpha and colorspace attribute

Context: whatwg/html#10456.
--

wpt-commits: 05ae498a46fd05d85b867fb1457df94a10dc4bb4
wpt-pr: 48630
AtkinsSJ added a commit to AtkinsSJ/ladybird that referenced this pull request Oct 31, 2024
This is a start on whatwg/html#10456 but it
turns out that our types don't work in a way that's compatible with
this, so I'm leaving it for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation topic: forms
Development

Successfully merging this pull request may close these issues.

Allow <input type="color"> to give an alpha channel and/or colors beyond sRGB?
6 participants