1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

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

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;