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
commit a999b82882
Notes: sideshowbarker 2024-07-17 09:48:30 +09:00

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