mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibWeb: Set zero underflow when calculating intrinsic width of block
This fix resolves issue where calculating the min size of a block could result in incorrect value if width of the block's children was compensated by margins to fit into container width (which is equal to 0 during min size calculation).
This commit is contained in:
parent
00e3e82bbd
commit
6cec431720
4 changed files with 55 additions and 5 deletions
|
@ -174,7 +174,7 @@ void BlockFormattingContext::compute_width(Box const& box, AvailableSpace const&
|
|||
|
||||
// 10.3.3 cont'd.
|
||||
auto underflow_px = width_of_containing_block - total_px;
|
||||
if (!isfinite(underflow_px.value()))
|
||||
if (available_space.width.is_intrinsic_sizing_constraint())
|
||||
underflow_px = 0;
|
||||
|
||||
if (width.is_auto()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue