From 5e9d1b216596b936100f34640d43dc534fc35cbf Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 6 Jun 2020 22:13:24 +0200 Subject: [PATCH] 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. --- Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp b/Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp index d266a4f61e..1ed4397c2f 100644 --- a/Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp +++ b/Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp @@ -79,8 +79,10 @@ static RefPtr create_layout_tree(Node& node, const StyleProperties* RefPtr LayoutTreeBuilder::build(Node& node) { - // FIXME: Support building partial trees. - ASSERT(is(node) || !node.has_children()); + if (!is(node) && node.has_children()) { + dbg() << "FIXME: Support building partial layout trees."; + return nullptr; + } return create_layout_tree(node, nullptr); }