Преглед изворни кода

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 година
родитељ
комит
d3de2b7de5
1 измењених фајлова са 1 додато и 1 уклоњено
  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)
 RefPtr<LayoutNode> LayoutTreeBuilder::build(Node& node)
 {
 {
     // FIXME: Support building partial trees.
     // FIXME: Support building partial trees.
-    ASSERT(is<Document>(node));
+    ASSERT(is<Document>(node) || !node.has_children());
     return create_layout_tree(node, nullptr);
     return create_layout_tree(node, nullptr);
 }
 }