Pārlūkot izejas kodu

LibWeb: Fix reset of floats y offset

Commit 7dc0edcb8625deae09317a1861d3c8d6ad9bca61 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.
Aliaksandr Kalenik 2 gadi atpakaļ
vecāks
revīzija
6eb2f4bfee

+ 0 - 2
Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp

@@ -557,8 +557,6 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer const& b
     });
 
     m_margin_state.block_container_y_position_update_callback = {};
-    m_left_floats.clear();
-    m_right_floats.clear();
 
     if (layout_mode == LayoutMode::IntrinsicSizing) {
         auto& block_container_state = m_state.get_mutable(block_container);