[webkit-reviews] review granted: [Bug 221352] Add support for hwb() colors defined in CSS Color 4 : [Attachment 419175] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 3 15:13:09 PST 2021

Darin Adler <darin at apple.com> has granted Sam Weinig <sam at webkit.org>'s request
for review:
Bug 221352: Add support for hwb() colors defined in CSS Color 4

Attachment 419175: Patch


--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 419175
  --> https://bugs.webkit.org/attachment.cgi?id=419175

View in context: https://bugs.webkit.org/attachment.cgi?id=419175&action=review

> Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:835
> +    CSSParserTokenRange args = consumeFunction(range);


> Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:888
> +    return convertTo<SRGBA<uint8_t>>(toSRGBA(HWBA<float> {
static_cast<float>(normalizedHue), static_cast<float>(nomalizedWhiteness),
static_cast<float>(nomalizedBlackness), static_cast<float>(*alpha) }));

I’m a little surprised a this:


I understand that we have to specify "uint8_t"; my surprise is that convertTo
does not implicitly include the toSRGBA work.

More information about the webkit-reviews mailing list