mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibWeb: Fix table-row y-position
Fixes the y-position of rows when indicated through the display attribute `table-row`. Previously there was no y-offset between rows and so they would overlap.
This commit is contained in:
parent
883b0f1390
commit
3dccee6025
1 changed files with 3 additions and 0 deletions
|
@ -276,6 +276,7 @@ void TableFormattingContext::run(Box const& box, LayoutMode, AvailableSpace cons
|
|||
row.baseline = max(row.baseline, cell.baseline);
|
||||
}
|
||||
|
||||
float row_top_offset = 0.0f;
|
||||
for (size_t y = 0; y < m_rows.size(); y++) {
|
||||
auto& row = m_rows[y];
|
||||
auto& row_state = m_state.get_mutable(row.box);
|
||||
|
@ -286,6 +287,8 @@ void TableFormattingContext::run(Box const& box, LayoutMode, AvailableSpace cons
|
|||
|
||||
row_state.set_content_height(row.used_width);
|
||||
row_state.set_content_width(row_width);
|
||||
row_state.set_content_y(row_top_offset);
|
||||
row_top_offset += row_state.content_height();
|
||||
}
|
||||
|
||||
float row_group_top_offset = 0.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue