LibWeb: Don't mark non-painted images as being inside the viewport

This commit is contained in:
Andreas Kling 2022-04-10 20:16:09 +02:00
parent 20c65e4298
commit 5e35167e05
Notes: sideshowbarker 2024-07-17 12:08:29 +09:00

View File

@ -78,7 +78,7 @@ bool ImageBox::renders_as_alt_text() const
void ImageBox::browsing_context_did_set_viewport_rect(Gfx::IntRect const& viewport_rect)
{
m_image_loader.set_visible_in_viewport(viewport_rect.to_type<float>().intersects(paint_box()->absolute_rect()));
m_image_loader.set_visible_in_viewport(paint_box() && viewport_rect.to_type<float>().intersects(paint_box()->absolute_rect()));
}
RefPtr<Painting::Paintable> ImageBox::create_paintable() const