Kaynağa Gözat

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(!)
Andreas Kling 2 yıl önce
ebeveyn
işleme
e5b97f4a57

+ 1 - 0
Userland/Services/WebContent/ConnectionFromClient.cpp

@@ -626,6 +626,7 @@ Messages::WebContentServer::DumpLayoutTreeResponse ConnectionFromClient::dump_la
     auto* document = page().top_level_browsing_context().active_document();
     auto* document = page().top_level_browsing_context().active_document();
     if (!document)
     if (!document)
         return DeprecatedString { "(no DOM tree)" };
         return DeprecatedString { "(no DOM tree)" };
+    document->update_layout();
     auto* layout_root = document->layout_node();
     auto* layout_root = document->layout_node();
     if (!layout_root)
     if (!layout_root)
         return DeprecatedString { "(no layout tree)" };
         return DeprecatedString { "(no layout tree)" };