1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

LibWeb: Prevent double promotion in paint_background

This commit is contained in:
implicitfield 2023-06-16 17:13:26 +04:00 committed by Andreas Kling
parent 007f3cdb00
commit 58c4e266e9

View file

@ -252,7 +252,7 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet
x_step = image_rect.width(); x_step = image_rect.width();
repeat_x = false; repeat_x = false;
} else { } else {
auto space = fmod(background_positioning_area.width().to_float(), image_rect.width().to_float()); auto space = fmod(background_positioning_area.width().to_double(), image_rect.width().to_double());
x_step = image_rect.width() + (space / static_cast<double>(whole_images - 1)); x_step = image_rect.width() + (space / static_cast<double>(whole_images - 1));
repeat_x = true; repeat_x = true;
} }