LibWeb/CSS: Use double in CSSHWB::to_color()

See previous the commit description for more details about the floating
points operations.

The hwb test cases in `css-color-functions` are now rendered identically
to what firefox does (I haven't checked the others tests, but they
aren't affected by this commit).
This commit is contained in:
Lucas CHOLLET 2024-11-18 00:04:51 -05:00 committed by Sam Atkins
commit a1687854ab
Notes: github-actions[bot] 2024-11-21 12:00:42 +00:00
5 changed files with 29 additions and 6 deletions

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: CSS Color 4: hwb</title>
<style>
.test { background-color: rgb(20% 70% 20%); width: 12em; height: 12em; } /* hwb(120 20% 30%) converted to sRGB */
</style>
<body>
<p>Test passes if you see a single square, and not two rectangles of different colors.</p>
<div class="test"></div>
</body>