1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:27:35 +00:00

LibWeb: Support max-content for width, min-width and max-width

We're gonna need to handle this in many more places, this patch only
adds it to calculate_inner_width().
This commit is contained in:
Andreas Kling 2023-05-28 18:18:34 +02:00
parent 358d94b57a
commit 97c510329c
4 changed files with 53 additions and 1 deletions

View file

@ -0,0 +1,24 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x76.40625 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x58.40625 children: not-inline
BlockContainer <div.foo> at (11,11) content-size 150.21875x17.46875 children: inline
line 0 width: 150.21875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 18, rect: [11,11 150.21875x17.46875]
"width: max-content"
TextNode <#text>
BlockContainer <(anonymous)> at (10,29.46875) content-size 780x0 children: inline
TextNode <#text>
BlockContainer <div.bar> at (11,30.46875) content-size 187.953125x17.46875 children: inline
line 0 width: 187.953125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 22, rect: [11,30.46875 187.953125x17.46875]
"max-width: max-content"
TextNode <#text>
BlockContainer <(anonymous)> at (10,48.9375) content-size 780x0 children: inline
TextNode <#text>
BlockContainer <div.baz> at (11,49.9375) content-size 183.078125x17.46875 children: inline
line 0 width: 183.078125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 22, rect: [11,49.9375 183.078125x17.46875]
"min-width: max-content"
TextNode <#text>
BlockContainer <(anonymous)> at (10,68.40625) content-size 780x0 children: inline
TextNode <#text>