[webkit-reviews] review requested: [Bug 69152] Web Inspector: rgb() with percentages shows wrong hex/hsl values : [Attachment 109336] [PATCH] Fix RGB Percentage Values and Other Clamping

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 30 13:13:08 PDT 2011


Joseph Pecoraro <joepeck at webkit.org> has asked	for review:
Bug 69152: Web Inspector: rgb() with percentages shows wrong hex/hsl values
https://bugs.webkit.org/show_bug.cgi?id=69152

Attachment 109336: [PATCH] Fix RGB Percentage Values and Other Clamping
https://bugs.webkit.org/attachment.cgi?id=109336&action=review

------- Additional Comments from Joseph Pecoraro <joepeck at webkit.org>
This patch:

  • handles individual RGB values that could be either a % or a decimal/float.
  • handles clamping RGB values

  • handles clamping alpha/opacity values for RGBA/HSLA
    http://www.w3.org/TR/css3-color/#transparency
    """The same as the specified value after clipping the <alphavalue> to the
range [0.0,1.0]."""

  • handles negative saturation HSL values:
    http://www.w3.org/TR/css3-color/#hsl-color
    """If saturation is less than 0%, implementations must clip it to 0%"""

I don't know much about the handling of other unclamped HSL values, but we
seemed to do okay.
I didn't include that in my test, another bug might need to be opened to add
specific tests for HSL.


More information about the webkit-reviews mailing list