summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-28 18:14:38 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-28 18:14:38 +0200
commit23561133aa66172c72f955c6042e318e52a64d8d (patch)
tree47b8b9bd41a286b6c527870aac18aef997e860a2 /Userland
parent7ec7729e1be385f9fd7861b167599b7159b20151 (diff)
downloadserenity-23561133aa66172c72f955c6042e318e52a64d8d.zip
LibWeb: Always update layout (if needed) before painting
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Services/WebContent/PageHost.cpp4
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);