1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

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.
This commit is contained in:
Andreas Kling 2020-06-06 22:13:24 +02:00
parent 39ad42defd
commit 5e9d1b2165

View file

@ -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);
}