1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:47:46 +00:00

LibWeb: Resolve cyclic % against 0 when available size is min-content

This fixes an issue where replaced elements with cyclic percentage width
would make an oversized min-content contribution to its container.
This commit is contained in:
Andreas Kling 2023-06-08 12:56:34 +02:00
parent a5f8f8238f
commit 3365a1e034
3 changed files with 60 additions and 4 deletions

View file

@ -0,0 +1,27 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x1251.46875 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x1233.46875 children: not-inline
BlockContainer <div.w.min> at (11,11) content-size 2x17.46875 children: inline
line 0 width: 4, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from ImageBox start: 0, length: 0, rect: [12,21 2x2]
ImageBox <img> at (12,21) content-size 2x2 children: not-inline
BlockContainer <(anonymous)> at (10,29.46875) content-size 780x0 children: inline
TextNode <#text>
BlockContainer <div.w.max> at (11,30.46875) content-size 402x404 children: inline
line 0 width: 404, height: 404, bottom: 404, baseline: 404
frag 0 from ImageBox start: 0, length: 0, rect: [12,31.46875 402x402]
ImageBox <img> at (12,31.46875) content-size 402x402 children: not-inline
BlockContainer <(anonymous)> at (10,435.46875) content-size 780x0 children: inline
TextNode <#text>
BlockContainer <div.h.min> at (11,436.46875) content-size 778x402 children: inline
line 0 width: 402, height: 402, bottom: 402, baseline: 402
frag 0 from ImageBox start: 0, length: 0, rect: [12,437.46875 400x400]
ImageBox <img> at (12,437.46875) content-size 400x400 children: not-inline
BlockContainer <(anonymous)> at (10,839.46875) content-size 780x0 children: inline
TextNode <#text>
BlockContainer <div.h.max> at (11,840.46875) content-size 778x402 children: inline
line 0 width: 402, height: 402, bottom: 402, baseline: 402
frag 0 from ImageBox start: 0, length: 0, rect: [12,841.46875 400x400]
ImageBox <img> at (12,841.46875) content-size 400x400 children: not-inline
BlockContainer <(anonymous)> at (10,1243.46875) content-size 780x0 children: inline
TextNode <#text>