mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:47:35 +00:00
LibWeb: Include floats in height:auto for BFC root with inline children
BFC roots with children_are_inline()==true can still have floating boxes as well. children_are_inline() is only concerned with in-flow children. For this reason, we have to always consider floats when calculating height:auto for BFC roots.
This commit is contained in:
parent
618273b48d
commit
925c34cf43
1 changed files with 18 additions and 16 deletions
|
@ -298,6 +298,8 @@ float FormattingContext::compute_auto_height_for_block_formatting_context_root(F
|
||||||
|
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// In addition, if the element has any floating descendants
|
// In addition, if the element has any floating descendants
|
||||||
// whose bottom margin edge is below the element's bottom content edge,
|
// whose bottom margin edge is below the element's bottom content edge,
|
||||||
// then the height is increased to include those edges.
|
// then the height is increased to include those edges.
|
||||||
|
@ -314,7 +316,7 @@ float FormattingContext::compute_auto_height_for_block_formatting_context_root(F
|
||||||
|
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
return bottom.value_or(0) - top.value_or(0);
|
return bottom.value_or(0) - top.value_or(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue