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).
This commit is contained in:
parent
3ca6d7dd36
commit
8f8fbf3487
Notes:
sideshowbarker
2024-07-18 18:52:31 +09:00
Author: https://github.com/Cleverking2003 Commit: https://github.com/SerenityOS/serenity/commit/8f8fbf3487a Pull-request: https://github.com/SerenityOS/serenity/pull/6736 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue