mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +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
@@ -48,7 +48,7 @@ void InlineLevelIterator::enter_node_with_box_model_metrics(Layout::NodeWithStyl
|
||||
m_extra_leading_metrics->padding += used_values.padding_left;
|
||||
|
||||
// Now's our chance to resolve the inset properties for this node.
|
||||
m_inline_formatting_context.compute_inset(node);
|
||||
m_inline_formatting_context.compute_inset(node, m_inline_formatting_context.content_box_rect(m_containing_block_used_values).size());
|
||||
|
||||
m_box_model_node_stack.append(node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user