Files
serenity/Userland/Libraries/LibWeb/CSS/StyleValues/CSSRGB.cpp
ronak69 a3f56f9abb LibWeb/CSS: Tweak in CSSRGB::to_color() to avoid floating point errors
Example of the difference:

    50 * 2.55      --> 127.4999 --> round towards +∞ --> 127
    50 * 255 / 100 --> 127.5000 --> round towards +∞ --> 128

Now, 9 failing WPT tests in /css/css-color/ pass.

(cherry picked from commit 6c3ecf6a342cbc0a83c1deac89e1a7edf6d959c4;
amended because css-color-functions.html is a reftest for us, not
a screenshot test)
2024-10-26 11:39:39 -04:00

2.5 KiB