[Webkit-unassigned] [Bug 180528] Update HSL/HSLA parsing to match CSS Color 4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 20 14:45:45 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=180528

--- Comment #42 from Chris Nardi <cnardi at chromium.org> ---
(In reply to Simon Fraser (smfr) from comment #40)
> > Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:546
> > +    // The hue needs to be in the range [0.0, 6.0)
> 
> This needs a comment to say where the 6 comes from. I assume this feeds into
> the calcHue logic. Should we convert to the 6-based values here, or keep it
> as an angle at this point?

I added "for calcHue()" to hopefully clarify; the other values are already converted to their [0.0, 1.0) values right below so I think it makes sense to convert at this point.

For reference, changing it to 6-based instead of 1-based is because the spec's pseudocode changed in Color 4 (https://drafts.csswg.org/css-color/#hsl-to-rgb), and matching our implementation to the pseudocode should help spot any bugs/make updates easier.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180420/afa52c90/attachment.html>


More information about the webkit-unassigned mailing list