From b88641e44bd844d208827c013ee082d41d90e1e4 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 18 Sep 2021 20:59:42 +0100 Subject: [PATCH] LibWeb: Stop painting backgrounds for TextNodes Doing so was causing the background to be painted twice, which looks ugly if the background is semi-transparent. The painting is a bit of a hack, as some situations apparently relied on it. This commit is ripping the band-aid off to find where those are and fix them. :^) --- Userland/Libraries/LibWeb/Layout/TextNode.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.cpp b/Userland/Libraries/LibWeb/Layout/TextNode.cpp index 13f005fcb4..09982b30d6 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/TextNode.cpp @@ -74,10 +74,6 @@ void TextNode::paint_fragment(PaintContext& context, const LineBoxFragment& frag { auto& painter = context.painter(); - if (phase == PaintPhase::Background) { - painter.fill_rect(enclosing_int_rect(fragment.absolute_rect()), computed_values().background_color()); - } - if (phase == PaintPhase::Foreground) { painter.set_font(font());