Bug 1831413 [wpt PR 39852] - Add epsilon for color rounding., a=testonly
commit88b3fa08cb4346e0a41a5fb7e680dd3f6a8a333f
authorAaron Krajeski <aaronhk@chromium.org>
Wed, 17 May 2023 16:17:04 +0000 (17 16:17 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sun, 21 May 2023 22:45:20 +0000 (21 22:45 +0000)
treeff895811f9ef17b0d576e7d275ec2b56cf1959b3
parenteb113c6db1888812a60034fdb7c1f0f3352a55bb
Bug 1831413 [wpt PR 39852] - Add epsilon for color rounding., a=testonly

Automatic update from web-platform-tests
Add epsilon for color rounding.

Colors that have a channel value of exactly 0.5 were getting incorrectly
serialized as having an integer value of 127 (as opposed to 128) due
to float arithmetic problems.

This change also gets Red(), Green() and Blue() out of CSS
serializations, and instead uses the underlying float values which
should make things more robust.

Eventually my goal is to remove Red(), Green() and Blue() entirely.

Bug: 14258561434423
Change-Id: I437070969f546b6fd3e9a6c1a965627d6a17b958
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4507865
Commit-Queue: Aaron Krajeski <aaronhk@chromium.org>
Reviewed-by: Jean-Philippe Gravel <jpgravel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1142378}

--

wpt-commits: e88c468b191d67e7c5333a40c713b45fd7a80957
wpt-pr: 39852
testing/web-platform/tests/css/css-color/parsing/color-valid-hwb.html