mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +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:
parent
07d8ddb5fa
commit
a8c1d12e84
Notes:
github-actions[bot]
2024-11-11 19:21:44 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: a8c1d12e84
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2285
9 changed files with 102 additions and 12 deletions
|
@ -294,7 +294,7 @@ void InlineFormattingContext::generate_line_boxes()
|
|||
}
|
||||
case InlineLevelIterator::Item::Type::Element: {
|
||||
auto& box = verify_cast<Layout::Box>(*item.node);
|
||||
compute_inset(box);
|
||||
compute_inset(box, content_box_rect(m_containing_block_used_values).size());
|
||||
if (containing_block().computed_values().white_space() != CSS::WhiteSpace::Nowrap) {
|
||||
auto minimum_space_needed_on_line = item.border_box_width();
|
||||
if (item.margin_start < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue