1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

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. :^)
This commit is contained in:
Sam Atkins 2021-09-18 20:59:42 +01:00 committed by Andreas Kling
parent 7ef4d75716
commit b88641e44b

View file

@ -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());