mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +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.
65 lines
3.8 KiB
Plaintext
65 lines
3.8 KiB
Plaintext
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|
BlockContainer <html> at (1,1) content-size 798x261 [BFC] children: not-inline
|
|
BlockContainer <body> at (10,10) content-size 780x243 children: not-inline
|
|
BlockContainer <(anonymous)> at (10,10) content-size 780x0 children: inline
|
|
TextNode <#text>
|
|
Box <div.grid> at (31,31) content-size 738x39 [GFC] children: not-inline
|
|
BlockContainer <div.start> at (32,32) content-size 367x17 [BFC] children: inline
|
|
line 0 width: 50.203125, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 6, rect: [32,32 50.203125x17]
|
|
"Start1"
|
|
TextNode <#text>
|
|
BlockContainer <div.item-padding> at (411,42) content-size 347x17 [BFC] children: inline
|
|
line 0 width: 52.671875, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 6, rect: [411,42 52.671875x17]
|
|
"Start2"
|
|
TextNode <#text>
|
|
BlockContainer <(anonymous)> at (10,91) content-size 780x0 children: inline
|
|
TextNode <#text>
|
|
Box <div.grid> at (31,112) content-size 738x39 [GFC] children: not-inline
|
|
BlockContainer <div.center> at (32,123) content-size 367x17 [BFC] children: inline
|
|
line 0 width: 59.390625, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 7, rect: [32,123 59.390625x17]
|
|
"Center1"
|
|
TextNode <#text>
|
|
BlockContainer <div.item-padding> at (411,123) content-size 347x17 [BFC] children: inline
|
|
line 0 width: 61.859375, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 7, rect: [411,123 61.859375x17]
|
|
"Center2"
|
|
TextNode <#text>
|
|
BlockContainer <(anonymous)> at (10,172) content-size 780x0 children: inline
|
|
TextNode <#text>
|
|
Box <div.grid> at (31,193) content-size 738x39 [GFC] children: not-inline
|
|
BlockContainer <div.end> at (32,214) content-size 367x17 [BFC] children: inline
|
|
line 0 width: 35.671875, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 4, rect: [32,214 35.671875x17]
|
|
"End1"
|
|
TextNode <#text>
|
|
BlockContainer <div.item-padding> at (411,204) content-size 347x17 [BFC] children: inline
|
|
line 0 width: 38.140625, height: 17, bottom: 17, baseline: 13.296875
|
|
frag 0 from TextNode start: 0, length: 4, rect: [411,204 38.140625x17]
|
|
"End2"
|
|
TextNode <#text>
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x263]
|
|
PaintableWithLines (BlockContainer<BODY>) [9,9 782x245]
|
|
PaintableWithLines (BlockContainer(anonymous)) [10,10 780x0]
|
|
PaintableBox (Box<DIV>.grid) [10,10 780x81]
|
|
PaintableWithLines (BlockContainer<DIV>.start) [31,31 369x19]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<DIV>.item-padding) [400,31 369x39]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [10,91 780x0]
|
|
PaintableBox (Box<DIV>.grid) [10,91 780x81]
|
|
PaintableWithLines (BlockContainer<DIV>.center) [31,122 369x19]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<DIV>.item-padding) [400,112 369x39]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [10,172 780x0]
|
|
PaintableBox (Box<DIV>.grid) [10,172 780x81]
|
|
PaintableWithLines (BlockContainer<DIV>.end) [31,213 369x19]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<DIV>.item-padding) [400,193 369x39]
|
|
TextPaintable (TextNode<#text>)
|