From 88d5fd4b733b2f1ff83659d130b2fce40f53cfaa Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 31 Dec 2022 14:14:42 -0500 Subject: [PATCH] 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. --- Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp b/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp index ca1419e998..f7cf17d61c 100644 --- a/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp @@ -309,11 +309,11 @@ void paint_background(PaintContext& context, Layout::NodeWithStyleAndBoxModelMet image.resolve_for_size(layout_node, image_rect.size().to_type()); - while (image_y < css_clip_rect.bottom()) { + while (image_y <= css_clip_rect.bottom()) { image_rect.set_y(image_y); 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); 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()))