Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0fcf163eb15b8fab1a95660ca8067908861bd9bf
https://github.com/WebKit/WebKit/commit/0fcf163eb15b8fab1a95660ca8067908861bd9bf
Author: Sam Weinig <[email protected]>
Date: 2026-06-16 (Tue, 16 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-hsl.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-hwb.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hsl.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hwb.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html
M Source/WebCore/platform/graphics/ColorSerialization.cpp
M Source/WebCore/platform/graphics/ColorSpace.h
Log Message:
-----------
Serialize hsl()/hwb() with at least one `none` component value as hsl()/hwb()
https://bugs.webkit.org/show_bug.cgi?id=317102
Reviewed by Darin Adler.
CSS Color 4 was changed so that now when there is at least one `none` component
in an hsl() or hwb() color function, we preserve the spelling of the hsl()/hwb()
functions, rather than converting to rgb().
See https://drafts.csswg.org/css-color-4/#css-serialization-of-srgb.
Updates WPT tests to test new serialization.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-hsl.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-hwb.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hsl.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hwb.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html:
* Source/WebCore/platform/graphics/ColorSerialization.cpp:
- Remove specialized functions for lab-like and lch-like function
serialization, creating a shared
`serializationUsingNamedFunction` that can be used by HSL and HWB as
well. It uses a new helper,
`normalizedNumericComponent` to figure out if hue normalization is needed
using the ColorModel's
componentInfo table.
* Source/WebCore/platform/graphics/ColorSpace.h:
- Added a function to get the ColorSpace from a color allowing generic
contexts without a
template argument specified type to easily access the ColorSpace.
Canonical link: https://commits.webkit.org/315317@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications