浏览代码

LibWeb: Anonymous table cells should have colspan=1

Otherwise the column widths calculation algorithm will assert.

Fixes #5078.
Andreas Kling 4 年之前
父节点
当前提交
ce1c8e0bde
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Layout/TableCellBox.cpp

+ 1 - 1
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::Element>(*dom_node()).attribute(HTML::AttributeNames::colspan).to_uint().value_or(1);
 }