From e5b97f4a576d6b4e1bf9686b2dc00d65c5ff90ac Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 25 Apr 2023 17:58:26 +0200 Subject: [PATCH] WebContent: Always update layout before dumping layout tree This fixes an issue where layout tests were sometimes flakey because we tried dumping the layout tree before one had been built(!) --- Userland/Services/WebContent/ConnectionFromClient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index 1c3d7fd21c..dd23187a42 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -626,6 +626,7 @@ Messages::WebContentServer::DumpLayoutTreeResponse ConnectionFromClient::dump_la auto* document = page().top_level_browsing_context().active_document(); if (!document) return DeprecatedString { "(no DOM tree)" }; + document->update_layout(); auto* layout_root = document->layout_node(); if (!layout_root) return DeprecatedString { "(no layout tree)" };