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/885004
Reviewed-by: Eric Willigers <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Commit-Queue: Chris Nardi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#532032}