mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Use the parent container's y offset when finding static position
Fixes #18819.
This commit is contained in:
parent
bf06d5b634
commit
5da9f52b1f
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/implicitfield
Commit: 5da9f52b1f
Pull-request: https://github.com/SerenityOS/serenity/pull/23528
Issue: https://github.com/SerenityOS/serenity/issues/18819
Reviewed-by: https://github.com/kalenikaliaksandr ✅
5 changed files with 37 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue