summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-04-10 20:16:09 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-10 20:16:09 +0200
commit5e35167e05c6e92073aef4223bffc6130519dc43 (patch)
treec947baa255904e4dcefe9172e2a81d48d74add13
parent20c65e4298de69d192fd0624cc32949a64c7dfc7 (diff)
downloadserenity-5e35167e05c6e92073aef4223bffc6130519dc43.zip
LibWeb: Don't mark non-painted images as being inside the viewport
-rw-r--r--Userland/Libraries/LibWeb/Layout/ImageBox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp
index edb0f9edf8..be67828de8 100644
--- a/Userland/Libraries/LibWeb/Layout/ImageBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/ImageBox.cpp
@@ -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