mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:18:12 +00:00
LibWeb: Skip separate height computation for tables
With multi-line text cells, we don't reliably know the height would stay the same as the one set by the independent format context run. In such situations, we can end up with a table box which is sized inconsistently with the grid boxes of the table due to differences in line breaks.
This commit is contained in:
parent
0cea1a3baf
commit
f154446a9f
3 changed files with 48 additions and 1 deletions
|
@ -659,7 +659,11 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain
|
|||
}
|
||||
}
|
||||
|
||||
compute_height(box, available_space);
|
||||
// Tables already set their height during the independent formatting context run. When multi-line text cells are involved, using different
|
||||
// available space here than during the independent formatting context run can result in different line breaks and thus a different height.
|
||||
if (!box.display().is_table_inside()) {
|
||||
compute_height(box, available_space);
|
||||
}
|
||||
|
||||
if (independent_formatting_context || !margins_collapse_through(box, m_state)) {
|
||||
if (!m_margin_state.box_last_in_flow_child_margin_bottom_collapsed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue