From a999b8288209a002324c0376aa114b050bdfe73e Mon Sep 17 00:00:00 2001 From: MacDue Date: Thu, 30 Jun 2022 20:03:55 +0100 Subject: [PATCH] LibWeb: Fix background images not showing till scrolling/repaint Previously, set_needs_display() was passed an empty rectangle in ImageStyleValue::resource_did_load(). This led to the browser not doing a repaint when the image loaded. Fixes #14435 --- Userland/Libraries/LibWeb/CSS/StyleValue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp index bdd3d163f2..e11563aecd 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp @@ -1393,7 +1393,7 @@ void ImageStyleValue::resource_did_load() m_bitmap = resource()->bitmap(); // FIXME: Do less than a full repaint if possible? if (m_document && m_document->browsing_context()) - m_document->browsing_context()->set_needs_display({}); + m_document->browsing_context()->set_needs_display(); } String ImageStyleValue::to_string() const