mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibWeb: Fix wrong height:auto computation for block with floating child
If an element with height:auto has any floating descendants whose bottom margin edge is below the element's bottom content edge, then the height is increased to include those edges. Before this patch, we were stopping at the bottom *content* edge of floating descendants.
This commit is contained in:
parent
884ebc42b1
commit
6478b460fb
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ float FormattingContext::compute_auto_height_for_block_level_element(FormattingS
|
|||
|
||||
auto const& child_box_state = state.get(child_box);
|
||||
|
||||
float child_box_bottom = child_box_state.offset.y() + child_box_state.content_height;
|
||||
float child_box_bottom = child_box_state.offset.y() + child_box_state.content_height + child_box_state.margin_box_bottom();
|
||||
|
||||
if (!bottom.has_value() || child_box_bottom > bottom.value())
|
||||
bottom = child_box_bottom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue