From 5da9f52b1ffd5b17a9fb8213a616287ffb427dca Mon Sep 17 00:00:00 2001 From: implicitfield <114500360+implicitfield@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:09:42 +0400 Subject: [PATCH] LibWeb: Use the parent container's y offset when finding static position Fixes #18819. --- .../abspos-box-with-block-level-sibling.txt | 14 ++++++++++++++ .../abspos-box-with-block-level-sibling.html | 16 ++++++++++++++++ .../LibWeb/Layout/BlockFormattingContext.cpp | 1 + .../LibWeb/Layout/FormattingContext.cpp | 5 +++-- Userland/Libraries/LibWeb/Layout/LayoutState.h | 3 +++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 Tests/LibWeb/Layout/expected/abspos-box-with-block-level-sibling.txt create mode 100644 Tests/LibWeb/Layout/input/abspos-box-with-block-level-sibling.html diff --git a/Tests/LibWeb/Layout/expected/abspos-box-with-block-level-sibling.txt b/Tests/LibWeb/Layout/expected/abspos-box-with-block-level-sibling.txt new file mode 100644 index 0000000000..d83cca97b5 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/abspos-box-with-block-level-sibling.txt @@ -0,0 +1,14 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (5,5) content-size 790x236 [BFC] children: not-inline + BlockContainer
at (18,18) content-size 764x210 children: not-inline + BlockContainer