From ca4276db77bc91ec047f83c83b13c9e98ae03d6d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 18 Oct 2021 02:58:01 +0200 Subject: [PATCH] LibWeb: Fill page background with the "base" palette color This fixes an issue where you'd see black (or ghost) pixels when painting web pages with content smaller than the viewport. --- Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp index 2fa4ad6917..d8b0a6773b 100644 --- a/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp +++ b/Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp @@ -44,6 +44,7 @@ void InitialContainingBlock::build_stacking_context_tree() void InitialContainingBlock::paint_all_phases(PaintContext& context) { + context.painter().fill_rect(enclosing_int_rect(absolute_rect()), context.palette().base()); context.painter().translate(-context.viewport_rect().location()); stacking_context()->paint(context); }