1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00
serenity/Tests/LibWeb/Layout/expected/grid/max-width-grid-container-wrapper-in-max-content.txt
Andreas Kling e7de5cb4d2 LibWeb: Bring CSS line-height closer to other engines
This patch makes a few changes to the way we calculate line-height:

- `line-height: normal` is now resolved using metrics from the used
  font (specifically, round(A + D + lineGap)).

- `line-height: calc(...)` is now resolved at style compute time.

- `line-height` values are now absolutized at style compute time.

As a consequence of the above, we no longer need to walk the DOM
ancestor chain looking for line-heights during style computation.
Instead, values are inherited, resolved and absolutized locally.

This is not only much faster, but also makes our line-height metrics
match those of other engines like Gecko and Blink.
2024-01-12 15:04:06 +01:00

35 lines
2.3 KiB
Text

Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x118 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x102 children: not-inline
BlockContainer <div.wrapper> at (8,8) content-size 270x102 children: not-inline
Box <div.constrained> at (8,8) content-size 270x102 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 270x102 [BFC] children: inline
line 0 width: 261.0625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 35, rect: [8,8 261.0625x17]
"hello hello hello hello hello hello"
line 1 width: 261.0625, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 37, length: 35, rect: [8,25 261.0625x17]
"hello hello hello hello hello hello"
line 2 width: 261.0625, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 73, length: 35, rect: [8,42 261.0625x17]
"hello hello hello hello hello hello"
line 3 width: 261.0625, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 109, length: 35, rect: [8,59 261.0625x17]
"hello hello hello hello hello hello"
line 4 width: 261.0625, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 145, length: 35, rect: [8,76 261.0625x17]
"hello hello hello hello hello hello"
line 5 width: 81.6875, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 181, length: 11, rect: [8,93 81.6875x17]
"hello hello"
TextNode <#text>
BlockContainer <div> at (8,110) content-size 270x0 [BFC] children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x118]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x102]
PaintableWithLines (BlockContainer<DIV>.wrapper) [8,8 270x102]
PaintableBox (Box<DIV>.constrained) [8,8 270x102]
PaintableWithLines (BlockContainer(anonymous)) [8,8 270x102]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>) [8,110 270x0]