summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-06 22:13:24 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-06 22:15:17 +0200
commit5e9d1b216596b936100f34640d43dc534fc35cbf (patch)
treef2d4a464f49964a95d719a9b561df1a6202c8b64
parent39ad42defdcb01f1fb0ffc83ee53b9152630f14f (diff)
downloadserenity-5e9d1b216596b936100f34640d43dc534fc35cbf.zip
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.
-rw-r--r--Libraries/LibWeb/Layout/LayoutTreeBuilder.cpp6
1 files 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<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);
}