diff --git a/Libraries/LibWeb/CSS/StyleValues/CSSHWB.cpp b/Libraries/LibWeb/CSS/StyleValues/CSSHWB.cpp index 15a21652705..daf60f53452 100644 --- a/Libraries/LibWeb/CSS/StyleValues/CSSHWB.cpp +++ b/Libraries/LibWeb/CSS/StyleValues/CSSHWB.cpp @@ -25,8 +25,8 @@ Color CSSHWB::to_color(Optional) const return Color(gray, gray, gray, to_byte(alpha_val)); } - float value = 1 - b_val; - float saturation = 1 - (w_val / value); + auto value = 1 - b_val; + auto saturation = 1 - (w_val / value); return Color::from_hsv(h_val, saturation, value).with_opacity(alpha_val); } diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hwb-004-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hwb-004-ref.html new file mode 100644 index 00000000000..ac0035accc4 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hwb-004-ref.html @@ -0,0 +1,10 @@ + + +CSS Color 4: CSS Color 4: hwb + + +

Test passes if you see a single square, and not two rectangles of different colors.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hwb-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hwb-004.html new file mode 100644 index 00000000000..9b84df51312 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hwb-004.html @@ -0,0 +1,17 @@ + + +CSS Color 4: hwb + + + + + + +

Test passes if you see a single square, and not two rectangles of different colors.

+
+
+ diff --git a/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png b/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png index d89575b176d..515e7ffd530 100644 Binary files a/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png and b/Tests/LibWeb/Screenshot/images/css-color-functions-ref.png differ diff --git a/Tests/LibWeb/TestConfig.ini b/Tests/LibWeb/TestConfig.ini index bdf39884351..ea789db014b 100644 --- a/Tests/LibWeb/TestConfig.ini +++ b/Tests/LibWeb/TestConfig.ini @@ -162,7 +162,3 @@ Text/input/wpt-import/css/css-backgrounds/animations/discrete-no-interpolation.h ; https://github.com/LadybirdBrowser/ladybird/issues/2314 Text/input/test-http-test-server.html - -; Multiple bugs are affecting these tests. To avoid having to rebase them every -; single time, let's deactivate them for a bit. -Screenshot/input/css-color-functions.html