瀏覽代碼

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 年之前
父節點
當前提交
e5b97f4a57
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Services/WebContent/ConnectionFromClient.cpp

+ 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();
     if (!document)
         return DeprecatedString { "(no DOM tree)" };
+    document->update_layout();
     auto* layout_root = document->layout_node();
     if (!layout_root)
         return DeprecatedString { "(no layout tree)" };