mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Fix percentage insets resolution for grid items
compute_inset() was incorrectly retrieving the containing block size because containing_block() is unaware of grid areas that form a containing block for grid items but do not exist in the layout tree. With this change, we explicitly pass the containing block into compute_inset(), allowing it to correctly provide the containing block sizes for grid items.
This commit is contained in:
committed by
Andreas Kling
parent
07d8ddb5fa
commit
a8c1d12e84
@@ -176,7 +176,7 @@ void FlexFormattingContext::run(AvailableSpace const& available_space)
|
||||
if (auto independent_formatting_context = layout_inside(item.box, LayoutMode::Normal, item.used_values.available_inner_space_or_constraints_from(m_available_space_for_items->space)))
|
||||
independent_formatting_context->parent_context_did_dimension_child_root_box();
|
||||
|
||||
compute_inset(item.box);
|
||||
compute_inset(item.box, content_box_rect(m_flex_container_state).size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user