[webkit-reviews] review granted: [Bug 180528] Update HSL/HSLA parsing to match CSS Color 4 : [Attachment 331000] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 18 16:46:14 PST 2018
Dean Jackson <dino at apple.com> has granted Chris Nardi
<christopherncarmel at hotmail.com>'s request for review:
Bug 180528: Update HSL/HSLA parsing to match CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=180528
Attachment 331000: Patch
https://bugs.webkit.org/attachment.cgi?id=331000&action=review
--- Comment #32 from Dean Jackson <dino at apple.com> ---
Comment on attachment 331000
--> https://bugs.webkit.org/attachment.cgi?id=331000
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")
More information about the webkit-reviews
mailing list