mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
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.
59 lines
3.0 KiB
Plaintext
59 lines
3.0 KiB
Plaintext
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
|
BlockContainer <body> at (8,8) content-size 784x152 children: not-inline
|
|
BlockContainer <(anonymous)> at (8,8) content-size 784x17 children: inline
|
|
line 0 width: 136.609375, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 5, rect: [8,8 36.40625x17]
|
|
"well "
|
|
frag 1 from TextNode start: 0, length: 6, rect: [44,33 44.84375x17]
|
|
"hello "
|
|
frag 2 from TextNode start: 0, length: 7, rect: [89,58 55.359375x17]
|
|
"friends"
|
|
InlineNode <span>
|
|
TextNode <#text>
|
|
InlineNode <b>
|
|
TextNode <#text>
|
|
InlineNode <i>
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
BlockContainer <div> at (8,25) content-size 784x135 children: not-inline
|
|
BlockContainer <(anonymous)> at (8,25) content-size 784x68 children: inline
|
|
line 0 width: 0, height: 17, bottom: 17, baseline: 13.296875
|
|
line 1 width: 0, height: 17, bottom: 34, baseline: 13.296875
|
|
line 2 width: 0, height: 17, bottom: 51, baseline: 13.296875
|
|
line 3 width: 0, height: 17, bottom: 68, baseline: 13.296875
|
|
BreakNode <br>
|
|
BreakNode <br>
|
|
BreakNode <br>
|
|
BreakNode <br>
|
|
BlockContainer <pre#out> at (8,109) content-size 784x51 children: inline
|
|
line 0 width: 72.421875, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 10, rect: [8,109 72.421875x17]
|
|
"well: 0, 0"
|
|
line 1 width: 96.765625, height: 17, bottom: 34, baseline: 13.296875
|
|
frag 0 from TextNode start: 11, length: 13, rect: [8,126 96.765625x17]
|
|
"hello: 36, 25"
|
|
line 2 width: 113.65625, height: 17, bottom: 51, baseline: 13.296875
|
|
frag 0 from TextNode start: 25, length: 15, rect: [8,143 113.65625x17]
|
|
"friends: 45, 25"
|
|
TextNode <#text>
|
|
BlockContainer <(anonymous)> at (8,176) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,8 784x152] overflow: [8,8 784x168]
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x17] overflow: [8,8 784x67]
|
|
InlinePaintable (InlineNode<SPAN>)
|
|
TextPaintable (TextNode<#text>)
|
|
InlinePaintable (InlineNode<B>)
|
|
TextPaintable (TextNode<#text>)
|
|
InlinePaintable (InlineNode<I>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<DIV>) [8,25 784x135]
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,25 784x68]
|
|
PaintableWithLines (BlockContainer<PRE>#out) [8,109 784x51]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,176 784x0]
|