LibWeb: Always set the Y offset of the current block in BFC

Originally part of a fix in 15103d172c, it
appears that this is no longer necessary and received a better fix in a
more recent commit. Resolves a visual regression with the ACID3 test.
This commit is contained in:
Jelle Raaijmakers 2025-05-16 17:28:40 +02:00 committed by Andreas Kling
commit 170e599bd9
Notes: github-actions[bot] 2025-05-16 18:34:21 +00:00
3 changed files with 41 additions and 3 deletions

View file

@ -817,9 +817,7 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain
if (!m_margin_state.box_last_in_flow_child_margin_bottom_collapsed) {
m_margin_state.reset();
}
auto box_height = box_state.offset.y() + box_state.content_height() + box_state.border_box_bottom();
if (!m_y_offset_of_current_block_container.has_value() || box_height > m_y_offset_of_current_block_container.value())
m_y_offset_of_current_block_container = box_height;
m_y_offset_of_current_block_container = box_state.offset.y() + box_state.content_height() + box_state.border_box_bottom();
}
m_margin_state.box_last_in_flow_child_margin_bottom_collapsed = false;