mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Resolve % min-sizes against 0 while under min-content constraint
When resolving a percentage min-width or min-height size against a containing block currently under a min-content constraint, we should act as if the containing block has zero size in that axis.
This commit is contained in:
@@ -149,7 +149,7 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l
|
||||
}
|
||||
|
||||
CSSPixels width = unconstrained_width;
|
||||
if (!should_treat_max_width_as_none(box)) {
|
||||
if (!should_treat_max_width_as_none(box, m_available_space->width)) {
|
||||
auto max_width = box.computed_values().max_width().to_px(box, width_of_containing_block);
|
||||
width = min(width, max_width);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user