mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
committed by
Andreas Kling
parent
00e3e82bbd
commit
6cec431720
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user