From d9ece296f0a7a0e5c293c9f87303da4c57b5d4c3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 13 Jun 2020 22:18:12 +0200 Subject: [PATCH] LibWeb: Fix LayoutImage stupidly painting backgrounds over itself The good boy fix here would be to implement all of the CSS paint phases but for now, let's at least not paint a background over our image. :^) --- Libraries/LibWeb/Layout/LayoutImage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibWeb/Layout/LayoutImage.cpp b/Libraries/LibWeb/Layout/LayoutImage.cpp index 961a5cf49a..cb14c42a57 100644 --- a/Libraries/LibWeb/Layout/LayoutImage.cpp +++ b/Libraries/LibWeb/Layout/LayoutImage.cpp @@ -71,6 +71,8 @@ void LayoutImage::render(RenderingContext& context) if (!context.viewport_rect().intersects(enclosing_int_rect(absolute_rect()))) return; + LayoutReplaced::render(context); + if (renders_as_alt_text()) { context.painter().set_font(Gfx::Font::default_font()); Gfx::StylePainter::paint_frame(context.painter(), enclosing_int_rect(absolute_rect()), context.palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 2);