1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

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
This commit is contained in:
MacDue 2022-06-30 20:03:55 +01:00 committed by Linus Groh
parent e98f8f20df
commit a999b82882

View file

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