1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWeb: Table wrappers should not be ignored in auto height calculation

Though table wrappers are anonymous block containers (because
TableWrapper is inherited from BlockContainer) with no lines they
should not be skipped in block auto height calculation.
This commit is contained in:
Aliaksandr Kalenik 2023-01-29 15:47:37 +03:00 committed by Andreas Kling
parent 9e5fd95e44
commit f43f4feb1e
3 changed files with 35 additions and 1 deletions

View file

@ -433,7 +433,7 @@ CSSPixels BlockFormattingContext::compute_auto_height_for_block_level_element(Bo
auto const& child_box_state = m_state.get(*child_box);
// Ignore anonymous block containers with no lines. These don't count as in-flow block boxes.
if (child_box->is_anonymous() && child_box->is_block_container() && child_box_state.line_boxes.is_empty())
if (!child_box->is_table_wrapper() && child_box->is_anonymous() && child_box->is_block_container() && child_box_state.line_boxes.is_empty())
continue;
auto margin_bottom = m_margin_state.current_collapsed_margin();