diff --git a/Tests/LibWeb/Layout/expected/table/table-cell-not-paintable.txt b/Tests/LibWeb/Layout/expected/table/table-cell-not-paintable.txt new file mode 100644 index 00000000000..2cdca457714 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/table/table-cell-not-paintable.txt @@ -0,0 +1,17 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x17.46875 children: inline + line 0 width: 10, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from BlockContainer start: 0, length: 0, rect: [13,19 0x0] + BlockContainer \ No newline at end of file diff --git a/Userland/Libraries/LibWeb/Painting/TableBordersPainting.cpp b/Userland/Libraries/LibWeb/Painting/TableBordersPainting.cpp index 5535328e906..ece705f1d48 100644 --- a/Userland/Libraries/LibWeb/Painting/TableBordersPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/TableBordersPainting.cpp @@ -34,8 +34,9 @@ static void collect_cell_boxes(Vector& cell_boxes, Layout:: { box.for_each_child([&](auto& child) { if (child.display().is_table_cell()) { - VERIFY(is(child) && child.paintable()); - cell_boxes.append(static_cast(child).paintable_box()); + VERIFY(is(child)); + if (child.paintable()) + cell_boxes.append(static_cast(child).paintable_box()); } else { collect_cell_boxes(cell_boxes, child); }