1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibWeb: Use the parent container's y offset when finding static position

Fixes #18819.
This commit is contained in:
implicitfield 2024-03-08 14:09:42 +04:00 committed by Alexander Kalenik
parent bf06d5b634
commit 5da9f52b1f
5 changed files with 37 additions and 2 deletions

View file

@ -585,6 +585,7 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain
auto& box_state = m_state.get_mutable(box);
if (box.is_absolutely_positioned()) {
box_state.vertical_offset_of_parent_block_container = m_y_offset_of_current_block_container.value();
m_absolutely_positioned_boxes.append(box);
return;
}