1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 15:47:34 +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:
Aliaksandr Kalenik 2023-05-02 11:19:29 +03:00 committed by Andreas Kling
parent 00e3e82bbd
commit 6cec431720
4 changed files with 55 additions and 5 deletions

View file

@ -3,14 +3,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
TableWrapper <(anonymous)> at (350,8) content-size 100x17.46875 children: not-inline
TableBox <div> at (350,8) content-size 100x17.46875 children: not-inline
TableRowBox <(anonymous)> at (350,8) content-size 100x17.46875 children: not-inline
TableCellBox <(anonymous)> at (350,8) content-size 100x17.46875 children: not-inline
BlockContainer <(anonymous)> at (350,8) content-size 100x0 children: inline
TableRowBox <(anonymous)> at (350,8) content-size 2000x17.46875 children: not-inline
TableCellBox <(anonymous)> at (350,8) content-size 2000x17.46875 children: not-inline
BlockContainer <(anonymous)> at (350,8) content-size 2000x0 children: inline
TextNode <#text>
BlockContainer <div> at (350,8) content-size 2000x17.46875 children: inline
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [350,8 6.34375x17.46875]
"1"
TextNode <#text>
BlockContainer <(anonymous)> at (350,25.46875) content-size 100x0 children: inline
BlockContainer <(anonymous)> at (350,25.46875) content-size 2000x0 children: inline
TextNode <#text>