mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
LibWeb: Ignore empty anonymous block children in height:auto calculation
This fixes a regression on GitHub from
5da7ebb806
.
Thanks to Simon for reporting it! :^)
This commit is contained in:
parent
1e01a85cdf
commit
0fd51ae811
1 changed files with 6 additions and 1 deletions
|
@ -226,8 +226,13 @@ float FormattingContext::compute_auto_height_for_block_level_element(FormattingS
|
|||
if (child_box->is_list_item_marker_box())
|
||||
continue;
|
||||
|
||||
// FIXME: Handle margin collapsing.
|
||||
auto const& child_box_state = 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())
|
||||
continue;
|
||||
|
||||
// FIXME: Handle margin collapsing.
|
||||
return max(0, child_box_state.offset.y() + child_box_state.content_height + child_box_state.margin_box_bottom());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue