Przeglądaj źródła

LibWeb: Don't assert when trying to rebuild a single-node layout tree

This merely postpones dealing with partial layout tree rebuilds for a
while longer.
Andreas Kling 5 lat temu
rodzic
commit
d3de2b7de5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp

+ 1 - 1
Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp

@@ -84,7 +84,7 @@ 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));
+    ASSERT(is<Document>(node) || !node.has_children());
     return create_layout_tree(node, nullptr);
 }