diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-28 18:14:38 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-28 18:14:38 +0200 |
commit | 23561133aa66172c72f955c6042e318e52a64d8d (patch) | |
tree | 47b8b9bd41a286b6c527870aac18aef997e860a2 /Userland | |
parent | 7ec7729e1be385f9fd7861b167599b7159b20151 (diff) | |
download | serenity-23561133aa66172c72f955c6042e318e52a64d8d.zip |
LibWeb: Always update layout (if needed) before painting
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Services/WebContent/PageHost.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index 31cccb5ac1..811302b3cc 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -64,6 +64,10 @@ void PageHost::paint(const Gfx::IntRect& content_rect, Gfx::Bitmap& target) Gfx::Painter painter(target); Gfx::IntRect bitmap_rect { {}, content_rect.size() }; + auto* document = page().top_level_browsing_context().active_document(); + VERIFY(document); + document->update_layout(); + auto* layout_root = this->layout_root(); if (!layout_root) { painter.fill_rect(bitmap_rect, Color::White); |