From ce1c8e0bdee0da56a3e29af6210cee3de5e7a140 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 6 Feb 2021 23:25:58 +0100 Subject: [PATCH] LibWeb: Anonymous table cells should have colspan=1 Otherwise the column widths calculation algorithm will assert. Fixes #5078. --- Userland/Libraries/LibWeb/Layout/TableCellBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp b/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp index 197fe59b87b..b1863ee4597 100644 --- a/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp @@ -47,7 +47,7 @@ TableCellBox::~TableCellBox() size_t TableCellBox::colspan() const { if (!dom_node()) - return 0; + return 1; return downcast(*dom_node()).attribute(HTML::AttributeNames::colspan).to_uint().value_or(1); }