mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:47:35 +00:00
LibWeb: Forbid usage of indefinite width in calculate_min{max}_height
Changing `calculate_min_content_heigh()` and `calculate_min_content_heigh()` to accept width as `CSSPixels`, instead of `AvailableSize` that might be indefinite, makes it more explicit that width is supposed to be known by the time height is measured. This change has a bit of collateral damage which is rows height calculation regression in `table/inline-table-width` that worked before by accident.
This commit is contained in:
parent
9b61339261
commit
e25b1f76e1
8 changed files with 52 additions and 80 deletions
|
@ -1954,7 +1954,7 @@ CSSPixels GridFormattingContext::calculate_min_content_size(GridItem const& item
|
|||
if (dimension == GridDimension::Column) {
|
||||
return calculate_min_content_width(item.box);
|
||||
} else {
|
||||
return calculate_min_content_height(item.box, get_available_space_for_item(item).width);
|
||||
return calculate_min_content_height(item.box, get_available_space_for_item(item).width.to_px_or_zero());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1963,7 +1963,7 @@ CSSPixels GridFormattingContext::calculate_max_content_size(GridItem const& item
|
|||
if (dimension == GridDimension::Column) {
|
||||
return calculate_max_content_width(item.box);
|
||||
} else {
|
||||
return calculate_max_content_height(item.box, get_available_space_for_item(item).width);
|
||||
return calculate_max_content_height(item.box, get_available_space_for_item(item).width.to_px_or_zero());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue