1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 11:57:35 +00:00

LibWeb: Move layout box rect helpers into FormattingContext

These are only used during layout, and always within formatting context
code, so we might as well put them in FormattingContext and avoid having
to pass the LayoutState around all the time.
This commit is contained in:
Andreas Kling 2023-05-31 10:18:34 +02:00
parent 4f08fcde29
commit 42470d837e
10 changed files with 155 additions and 152 deletions

View file

@ -476,7 +476,7 @@ void TableFormattingContext::compute_table_height(LayoutMode layout_mode)
independent_formatting_context->parent_context_did_dimension_child_root_box();
}
cell.baseline = box_baseline(m_state, cell.box);
cell.baseline = box_baseline(cell.box);
// Only cells spanning the current row exclusively are part of computing minimum height of a row,
// as described in https://www.w3.org/TR/css-tables-3/#computing-the-table-height
@ -554,7 +554,7 @@ void TableFormattingContext::compute_table_height(LayoutMode layout_mode)
independent_formatting_context->parent_context_did_dimension_child_root_box();
}
cell.baseline = box_baseline(m_state, cell.box);
cell.baseline = box_baseline(cell.box);
row.reference_height = max(row.reference_height, cell_state.border_box_height());
row.baseline = max(row.baseline, cell.baseline);