mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibWeb: Apply a table row's height to all cells
This commit is contained in:
parent
bd809b7787
commit
5f265eebf5
Notes:
sideshowbarker
2024-07-17 16:38:01 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/5f265eebf5 Pull-request: https://github.com/SerenityOS/serenity/pull/13314
|
@ -118,14 +118,19 @@ void TableFormattingContext::layout_row(Box const& row, Vector<float>& column_wi
|
|||
tallest_cell_height = max(tallest_cell_height, cell_state.border_box_height());
|
||||
});
|
||||
|
||||
row_state.content_height = tallest_cell_height;
|
||||
|
||||
row.for_each_child_of_type<TableCellBox>([&](auto& cell) {
|
||||
auto& cell_state = m_state.get_mutable(cell);
|
||||
cell_state.content_height = tallest_cell_height - cell_state.border_box_top() - cell_state.border_box_bottom();
|
||||
});
|
||||
|
||||
if (use_auto_layout) {
|
||||
row_state.content_width = content_width;
|
||||
} else {
|
||||
auto& table_state = m_state.get_mutable(*table);
|
||||
row_state.content_width = table_state.content_width;
|
||||
}
|
||||
|
||||
row_state.content_height = tallest_cell_height;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue