1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00
serenity/Tests/LibWeb/Layout/expected/block-and-inline/button-with-abspos-pseudo-element.txt
Aliaksandr Kalenik 40dea272d2 LibWeb: Add boxes for before/after pseudos post button layout tweak
When a button should use flex for alignment and also has ::before
and/or ::after, we previously did the following:
1. Prepended/appended the button's children with boxes for
   pseudo-elements.
2. Replaced the button's direct children with a flex container that
   contains its children.
As a result, the generated boxes for ::before/::after ended up as
children of the generated flex item, instead of being direct children
of the button layout box as they were supposed to be.

This change reverses these steps, ensuring that boxes for
pseudo-elements are generated only after modifications inside the
button layout are completed.
2023-09-11 15:19:56 +02:00

19 lines
1.2 KiB
Text

Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x58 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x42 children: inline
line 0 width: 42, height: 42, bottom: 42, baseline: 42
frag 0 from BlockContainer start: 0, length: 0, rect: [29,29 0x0]
BlockContainer <button> at (29,29) content-size 0x0 positioned inline-block [BFC] children: not-inline
BlockContainer <(anonymous)> at (29,29) content-size 0x0 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (29,29) content-size 0x0 [BFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 40x40 positioned [BFC] children: inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x58]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x42]
PaintableWithLines (BlockContainer<BUTTON>) [8,8 42x42]
PaintableWithLines (BlockContainer(anonymous)) [29,29 0x0]
PaintableWithLines (BlockContainer(anonymous)) [29,29 0x0]
PaintableWithLines (BlockContainer(anonymous)) [9,9 40x40]