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(!)
This commit is contained in:
Andreas Kling 2023-04-25 17:58:26 +02:00
commit e5b97f4a57
Notes: sideshowbarker 2024-07-17 08:38:37 +09:00

View file

@ -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)" };