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

LibWeb: Paint repeating background images over entire paint box

We were previously missing the bottom- and right-most pixels. This fixes
the errant red line showing on the Acid2 forehead.
This commit is contained in:
Timothy Flynn 2022-12-31 14:14:42 -05:00 committed by Andreas Kling
parent b272b45137
commit 88d5fd4b73

View file

@ -309,11 +309,11 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet
image.resolve_for_size(layout_node, image_rect.size().to_type<float>()); image.resolve_for_size(layout_node, image_rect.size().to_type<float>());
while (image_y < css_clip_rect.bottom()) { while (image_y <= css_clip_rect.bottom()) {
image_rect.set_y(image_y); image_rect.set_y(image_y);
auto image_x = initial_image_x; auto image_x = initial_image_x;
while (image_x < css_clip_rect.right()) { while (image_x <= css_clip_rect.right()) {
image_rect.set_x(image_x); image_rect.set_x(image_x);
auto image_device_rect = context.rounded_device_rect(image_rect); auto image_device_rect = context.rounded_device_rect(image_rect);
if (image_device_rect != last_image_device_rect && image_device_rect.intersects(context.device_viewport_rect())) if (image_device_rect != last_image_device_rect && image_device_rect.intersects(context.device_viewport_rect()))