1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

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
parent e66313e536
commit e5b97f4a57

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