소스 검색

LibWeb: Whine in debug log instead of asserting on partial layout FIXME

We don't support incremental relayout of subtrees (only single nodes)
but let's not crash the browser just because this happens. We can keep
the browser up and just complain in the debug log instead.
Andreas Kling 5 년 전
부모
커밋
5e9d1b2165
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp

+ 4 - 2
Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp

@@ -79,8 +79,10 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
 
 RefPtr<LayoutNode> LayoutTreeBuilder::build(Node& node)
 {
-    // FIXME: Support building partial trees.
-    ASSERT(is<Document>(node) || !node.has_children());
+    if (!is<Document>(node) && node.has_children()) {
+        dbg() << "FIXME: Support building partial layout trees.";
+        return nullptr;
+    }
     return create_layout_tree(node, nullptr);
 }