From 20730c164c36f870538d3cecb768e20f6f480f98 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Mon, 21 Mar 2022 16:35:28 +0100 Subject: [PATCH] LibWeb: Include table cell border widths when calculating cell rects Previously, table cells would overlap when they had CSS border or padding properties defined. --- Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp index f5f4cb700a..9c3504af6d 100644 --- a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp @@ -85,7 +85,7 @@ void TableFormattingContext::calculate_column_widths(Box const& row, Vector& column_wi size_t cell_colspan = cell.colspan(); for (size_t i = 0; i < cell_colspan; ++i) content_width += column_widths[column_index++]; - tallest_cell_height = max(tallest_cell_height, cell_state.content_height); + tallest_cell_height = max(tallest_cell_height, cell_state.border_box_height()); }); if (use_auto_layout) {