1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

LibWeb: Invalidate paint-only property after relayout

Before this change, `set_needs_to_resolve_paint_only_properties()` was
only called after style invalidation. However, since relayout can be
triggered independently from style invalidation, we need to ensure that
paint-only properties are updated in that case too.
This commit is contained in:
Aliaksandr Kalenik 2024-02-07 13:13:32 +01:00 committed by Alexander Kalenik
parent e8a20b3c3e
commit ff3e454565
3 changed files with 31 additions and 1 deletions

View file

@ -1060,8 +1060,10 @@ void Document::update_layout()
// Broadcast the current viewport rect to any new paintables, so they know whether they're visible or not.
inform_all_viewport_clients_about_the_current_viewport_rect();
if (navigable())
if (navigable()) {
navigable()->set_needs_to_resolve_paint_only_properties();
navigable()->set_needs_display();
}
if (navigable()->is_traversable()) {
page().client().page_did_layout();