LibWeb: Expand the last cell in a row to the right edge

This commit is contained in:
Simon Wanner 2022-03-28 14:35:10 +02:00 committed by Andreas Kling
parent 5f265eebf5
commit 4fe154bd6a
Notes: sideshowbarker 2024-07-17 18:06:52 +09:00

View file

@ -44,6 +44,12 @@ void TableFormattingContext::run(Box const& box, LayoutMode)
calculate_column_widths(row, column_widths);
});
float missing_width = box_state.content_width;
for (auto column_width : column_widths)
missing_width -= column_width;
if (missing_width > 0)
column_widths[column_widths.size() - 1] += missing_width;
float content_width = 0;
float content_height = 0;