mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
Previously, buttons with `display: block` and `width: auto` would take an early return path in compute_width() that set the content width to fit-content but skipped all margin resolution. This meant `margin: auto` would not center the button horizontally.
27 lines
1.9 KiB
Plaintext
27 lines
1.9 KiB
Plaintext
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
|
|
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 52 0+0+0] [BFC] children: not-inline
|
|
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 36 0+0+8] children: not-inline
|
|
BlockContainer <input.btn> at [13,10] [0+1+4 195.796875 4+1+578.203125] [0+1+1 32 1+1+0] children: not-inline
|
|
BlockContainer <(anonymous)> at [13,10] flex-container(column) [0+0+0 195.796875 0+0+0] [0+0+0 32 0+0+0] [FFC] children: not-inline
|
|
BlockContainer <(anonymous)> at [13,17.5] flex-item [0+0+0 195.796875 0+0+0] [0+0+0 17 0+0+0] [BFC] children: inline
|
|
frag 0 from BlockContainer start: 0, length: 0, rect: [13,17.5 195.796875x17] baseline: 13
|
|
BlockContainer <span> at [13,17.5] inline-block [0+0+0 195.796875 0+0+0] [0+0+0 17 0+0+0] [BFC] children: inline
|
|
frag 0 from TextNode start: 0, length: 26, rect: [13,17.5 195.796875x17] baseline: 13
|
|
"Width should shrink to fit"
|
|
TextNode <#text> (not painted)
|
|
BlockContainer <(anonymous)> at [8,44] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
|
TextNode <#text> (not painted)
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x52]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,8 784x36]
|
|
PaintableWithLines (BlockContainer<INPUT>.btn) [8,8 205.796875x36]
|
|
PaintableWithLines (BlockContainer(anonymous)) [13,10 195.796875x32]
|
|
PaintableWithLines (BlockContainer(anonymous)) [13,17.5 195.796875x17]
|
|
PaintableWithLines (BlockContainer<SPAN>) [13,17.5 195.796875x17]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,44 784x0]
|
|
|
|
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
|
SC for BlockContainer<HTML> [0,0 800x52] [children: 0] (z-index: auto)
|