[webkit-reviews] review granted: [Bug 220716] Rework color clamping logic to be more consistent and clear : [Attachment 417978] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 20 10:49:05 PST 2021

Simon Fraser (smfr) <simon.fraser at apple.com> has granted Sam Weinig
<sam at webkit.org>'s request for review:
Bug 220716: Rework color clamping logic to be more consistent and clear

Attachment 417978: Patch


--- Comment #15 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 417978
  --> https://bugs.webkit.org/attachment.cgi?id=417978

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

> Source/WebCore/css/parser/CSSParserFastPaths.cpp:490
> +	   return makeClampingComponents<SRGBA<uint8_t>>(red, green, blue,
alpha); // FIXME: Already clamped, doesn't need to re-clamp. Update
parseColorIntOrPercentage/parseAlphaValue to return uint8_t and replace call to
makeClampingComponents<SRGBA<uint8_t>> with direct construction of

A bit hard to parse: "make components that clamp", or "make, clamping
components in the process".

More information about the webkit-reviews mailing list