-
Chris Nardi authored
CSS Color 4 states that all numbers should be parsed inside of the RGB and RGBA functions, instead of only integers as previously defined. This change updates our behavior to match this, with non-integers rounded to the nearest value. This additionally changes the behavior of percentage values, multiplying by 255 and rounding to match the spec instead of multiplying by 256 and flooring. The new spec is located at https://drafts.csswg.org/css-color-4/#rgb-functions. Bug: 703898 Change-Id: I826e92e7f81576240ad9b06f866df3300140b12c Reviewed-on: https://chromium-review.googlesource.com/885004Reviewed-by:
Eric Willigers <ericwilligers@chromium.org> Reviewed-by:
Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Chris Nardi <cnardi@chromium.org> Cr-Commit-Position: refs/heads/master@{#532032}
f8e89bb9