mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibWeb: Remove inheritance of TableRowGroupBox
from BlockContainer
Having `TableRowGroupBox` not inherited from `BlockContainer` allows to write more simpler layout code.
This commit is contained in:
parent
1bdc4e6b29
commit
c8337e9ee8
3 changed files with 7 additions and 10 deletions
|
@ -457,19 +457,16 @@ void TableFormattingContext::run(Box const& box, LayoutMode, AvailableSpace cons
|
|||
auto& row_group_box_state = m_state.get_mutable(row_group_box);
|
||||
row_group_box_state.set_content_y(row_group_top_offset);
|
||||
|
||||
CSSPixels row_top_offset = 0.0f;
|
||||
row_group_box.template for_each_child_of_type<TableRowBox>([&](auto& row) {
|
||||
auto& row_state = m_state.get_mutable(row);
|
||||
row_state.set_content_y(row_top_offset);
|
||||
auto const& row_state = m_state.get(row);
|
||||
row_group_height += row_state.border_box_height();
|
||||
row_group_width = max(row_group_width, row_state.border_box_width());
|
||||
row_top_offset += row_state.border_box_height();
|
||||
});
|
||||
|
||||
row_group_top_offset += row_top_offset;
|
||||
|
||||
row_group_box_state.set_content_height(row_group_height);
|
||||
row_group_box_state.set_content_width(row_group_width);
|
||||
|
||||
row_group_top_offset += row_group_height;
|
||||
});
|
||||
|
||||
for (auto& cell : m_cells) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue