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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 18 17:29:34 PST 2018


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

--- Comment #33 from Chris Nardi <christopherncarmel at hotmail.com> ---
(In reply to Dean Jackson from comment #32)
> Comment on attachment 331000 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=331000&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        This change imports web-platform-tests/css/css-color to test the new behavior.
> 
> It also updates the syntax.
> 
> > Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:534
> > -    colorArray[0] = (((hslValue->intValue() % 360) + 360) % 360) / 360.0;
> > +    colorArray[0] = fmod(fmod(angleValue, 360.0) + 360.0, 360.0) / 60.0;
> 
> Please add a comment explaining why this is / 60 now. Or, keep it as [0,1]
> and adjust in calcHue.
> 
> (I don't really understand why the specification decided [0,6) was a
> "simplification")

I added a comment above calcHue(), but I can add this inline in CSSPropertyParserHelpers.cpp too.

-- 
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/20180119/3535fc92/attachment.html>


More information about the webkit-unassigned mailing list