summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-06 23:25:58 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-06 23:27:03 +0100
commitce1c8e0bdee0da56a3e29af6210cee3de5e7a140 (patch)
treee61187e0eac7921a988d6fc3bb0701658aead932 /Userland/Libraries/LibWeb/Layout/TableCellBox.cpp
parent89483a94085a03b5c422ba4ad0e2f43841f07719 (diff)
downloadserenity-ce1c8e0bdee0da56a3e29af6210cee3de5e7a140.zip
LibWeb: Anonymous table cells should have colspan=1
Otherwise the column widths calculation algorithm will assert. Fixes #5078.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/TableCellBox.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/TableCellBox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp b/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp
index 197fe59b87..b1863ee459 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::Element>(*dom_node()).attribute(HTML::AttributeNames::colspan).to_uint().value_or(1);
}