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

LibWeb: Use root content width as automatic width if children inline

Returning greatest_child_width() from automatic_content_width() in BFC
if root box children are inline and there are min/max-width that caused
width to be changed after IFC layout while content_width should be
always set to correct value by layout_inline_children() regardless of
layout mode.
This commit is contained in:
Aliaksandr Kalenik 2023-08-09 16:59:20 +02:00 committed by Andreas Kling
parent 1f88109d78
commit b34b0a1cd3
4 changed files with 37 additions and 8 deletions

View file

@ -0,0 +1,16 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div#grid> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <a#box> at (8,8) content-size 288x17.46875 [BFC] children: inline
line 0 width: 102.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 13, rect: [8,8 102.75x17.46875]
"Start Selling"
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x33.46875]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x17.46875]
PaintableBox (Box<DIV>#grid) [8,8 784x17.46875]
PaintableWithLines (BlockContainer<A>#box) [8,8 288x17.46875]
TextPaintable (TextNode<#text>)