mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:18:11 +00:00
LibWeb: Include all row-groups in column width calculations
This was noticeable for example on fonts.serenityos.net, where the thead and tfoot would not get the same column widths as the tbody.
This commit is contained in:
parent
d28f3e0735
commit
509362c103
1 changed files with 5 additions and 4 deletions
|
@ -34,17 +34,18 @@ void TableFormattingContext::run(Box const& box, LayoutMode)
|
|||
float total_content_width = 0;
|
||||
float total_content_height = 0;
|
||||
|
||||
Vector<ColumnWidth> column_widths;
|
||||
box.for_each_child_of_type<TableRowGroupBox>([&](auto& row_group_box) {
|
||||
auto& row_group_box_state = m_state.get_mutable(row_group_box);
|
||||
|
||||
compute_width(row_group_box);
|
||||
auto column_count = row_group_box.column_count();
|
||||
Vector<ColumnWidth> column_widths;
|
||||
column_widths.resize(column_count);
|
||||
column_widths.resize(max(column_count, column_widths.size()));
|
||||
|
||||
row_group_box.template for_each_child_of_type<TableRowBox>([&](auto& row) {
|
||||
calculate_column_widths(row, table_width, column_widths);
|
||||
});
|
||||
});
|
||||
box.for_each_child_of_type<TableRowGroupBox>([&](auto& row_group_box) {
|
||||
auto& row_group_box_state = m_state.get_mutable(row_group_box);
|
||||
|
||||
float remaining_for_max = box_state.content_width;
|
||||
float remaining_for_min = box_state.content_width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue