mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:17:34 +00:00
LibWeb: Fix reset of floats y offset
Commit 7dc0edcb86
was supposed to prevent
floats from being placed higher than preceding boxes but the change
turned out to be completely wrong and caused regressions because:
1. Call to `clear()` in `layout_block_level_children` would reset
floating boxes only after layout of box with _not_ inline children
although the same should happen after layout of IFC.
2. `clear()` causes offset y of floats to be reset but it also clears
all currently enocuntered floating boxes which means the next box
that has actual clearance will get wrong y position.
This commit is contained in:
parent
66f98237a7
commit
6eb2f4bfee
1 changed files with 0 additions and 2 deletions
|
@ -557,8 +557,6 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer const& b
|
||||||
});
|
});
|
||||||
|
|
||||||
m_margin_state.block_container_y_position_update_callback = {};
|
m_margin_state.block_container_y_position_update_callback = {};
|
||||||
m_left_floats.clear();
|
|
||||||
m_right_floats.clear();
|
|
||||||
|
|
||||||
if (layout_mode == LayoutMode::IntrinsicSizing) {
|
if (layout_mode == LayoutMode::IntrinsicSizing) {
|
||||||
auto& block_container_state = m_state.get_mutable(block_container);
|
auto& block_container_state = m_state.get_mutable(block_container);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue