diff options
author | Egor Ananyin <ananinegor@gmail.com> | 2021-04-29 18:21:58 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-30 15:25:35 +0200 |
commit | 8f8fbf3487a9e28902ab9525c7c14195010a3f99 (patch) | |
tree | 7706fe0d6c33892f28178a9ce8768df6a3ee9835 /Userland/Libraries/LibWeb | |
parent | 3ca6d7dd366ec5a06d43610323d1ea9efe650fd2 (diff) | |
download | serenity-8f8fbf3487a9e28902ab9525c7c14195010a3f99.zip |
LibWeb: Position absolute boxes relative to the containing block
In the absolute positioning model, a box is explicitly offset with
respect to its containing block (CSS 2.1 section 9.6).
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FormattingContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index 412ad77b59..9595141599 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -553,7 +553,7 @@ void FormattingContext::compute_height_for_absolutely_positioned_non_replaced_el void FormattingContext::layout_absolutely_positioned_element(Box& box) { - auto& containing_block = context_box(); + auto& containing_block = *box.containing_block(); auto& box_model = box.box_model(); auto specified_width = box.computed_values().width().resolved_or_auto(box, containing_block.width()); |