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. :^)
This commit is contained in:
Andreas Kling 2020-06-13 22:18:12 +02:00
parent d51c1c136e
commit d9ece296f0
Notes: sideshowbarker 2024-07-19 05:39:42 +09:00

View file

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