mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +00:00
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.
This commit is contained in:
parent
f0722671c3
commit
e7de5cb4d2
385 changed files with 6889 additions and 6893 deletions
|
@ -1,114 +1,114 @@
|
|||
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 784x159.875 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 103.421875x159.875 [BFC] children: not-inline
|
||||
Box <table> at (9,9) content-size 101.421875x157.875 table-box [TFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x158 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 103.421875x158 [BFC] children: not-inline
|
||||
Box <table> at (9,9) content-size 101.421875x156 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tbody> at (9,9) content-size 101.421875x157.875 table-row-group children: not-inline
|
||||
Box <tr> at (9,9) content-size 101.421875x39.46875 table-row children: not-inline
|
||||
Box <tbody> at (9,9) content-size 101.421875x156 table-row-group children: not-inline
|
||||
Box <tr> at (9,9) content-size 101.421875x39 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (20,20) content-size 9.59375x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 9.59375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,20 9.59375x17.46875]
|
||||
BlockContainer <td> at (20,20) content-size 9.59375x17 table-cell [BFC] children: inline
|
||||
line 0 width: 9.59375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,20 9.59375x17]
|
||||
"0"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (51.59375,39.734375) content-size 14.265625x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 14.265625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [51.59375,39.734375 14.265625x17.46875]
|
||||
BlockContainer <td> at (51.59375,39.5) content-size 14.265625x17 table-cell [BFC] children: inline
|
||||
line 0 width: 14.265625, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [51.59375,39.5 14.265625x17]
|
||||
"A"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (87.859375,59.46875) content-size 11.5625x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 11.5625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [87.859375,59.46875 11.5625x17.46875]
|
||||
BlockContainer <td> at (87.859375,59) content-size 11.5625x17 table-cell [BFC] children: inline
|
||||
line 0 width: 11.5625, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [87.859375,59 11.5625x17]
|
||||
"X"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (9,48.46875) content-size 101.421875x39.46875 table-row children: not-inline
|
||||
Box <tr> at (9,48) content-size 101.421875x39 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (20,59.46875) content-size 9.59375x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,59.46875 6.34375x17.46875]
|
||||
BlockContainer <td> at (20,59) content-size 9.59375x17 table-cell [BFC] children: inline
|
||||
line 0 width: 6.34375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,59 6.34375x17]
|
||||
"1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (9,87.9375) content-size 101.421875x39.46875 table-row children: not-inline
|
||||
Box <tr> at (9,87) content-size 101.421875x39 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (20,98.9375) content-size 9.59375x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 8.8125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,98.9375 8.8125x17.46875]
|
||||
BlockContainer <td> at (20,98) content-size 9.59375x17 table-cell [BFC] children: inline
|
||||
line 0 width: 8.8125, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,98 8.8125x17]
|
||||
"2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (51.59375,118.671875) content-size 14.265625x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 9.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [51.59375,118.671875 9.34375x17.46875]
|
||||
BlockContainer <td> at (51.59375,117.5) content-size 14.265625x17 table-cell [BFC] children: inline
|
||||
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [51.59375,117.5 9.34375x17]
|
||||
"B"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (9,127.40625) content-size 101.421875x39.46875 table-row children: not-inline
|
||||
Box <tr> at (9,126) content-size 101.421875x39 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (20,138.40625) content-size 9.59375x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 9.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,138.40625 9.09375x17.46875]
|
||||
BlockContainer <td> at (20,137) content-size 9.59375x17 table-cell [BFC] children: inline
|
||||
line 0 width: 9.09375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [20,137 9.09375x17]
|
||||
"3"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (87.859375,138.40625) content-size 11.5625x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 10.3125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [87.859375,138.40625 10.3125x17.46875]
|
||||
BlockContainer <td> at (87.859375,137) content-size 11.5625x17 table-cell [BFC] children: inline
|
||||
line 0 width: 10.3125, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [87.859375,137 10.3125x17]
|
||||
"C"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,167.875) content-size 784x0 children: inline
|
||||
BlockContainer <(anonymous)> at (8,166) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x159.875]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [8,8 103.421875x159.875]
|
||||
PaintableBox (Box<TABLE>) [8,8 103.421875x159.875]
|
||||
PaintableBox (Box<TBODY>) [9,9 101.421875x157.875]
|
||||
PaintableBox (Box<TR>) [9,9 101.421875x39.46875] overflow: [9,9 101.421875x118.40625]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,9 31.59375x39.46875]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x158]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [8,8 103.421875x158]
|
||||
PaintableBox (Box<TABLE>) [8,8 103.421875x158]
|
||||
PaintableBox (Box<TBODY>) [9,9 101.421875x156]
|
||||
PaintableBox (Box<TR>) [9,9 101.421875x39] overflow: [9,9 101.421875x117]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,9 31.59375x39]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [40.59375,9 36.265625x78.9375]
|
||||
PaintableWithLines (BlockContainer<TD>) [40.59375,9 36.265625x78]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [76.859375,9 33.5625x118.40625]
|
||||
PaintableWithLines (BlockContainer<TD>) [76.859375,9 33.5625x117]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [9,48.46875 101.421875x39.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,48.46875 31.59375x39.46875]
|
||||
PaintableBox (Box<TR>) [9,48 101.421875x39]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,48 31.59375x39]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [9,87.9375 101.421875x39.46875] overflow: [9,87.9375 101.421875x78.9375]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,87.9375 31.59375x39.46875]
|
||||
PaintableBox (Box<TR>) [9,87 101.421875x39] overflow: [9,87 101.421875x78]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,87 31.59375x39]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [40.59375,87.9375 36.265625x78.9375]
|
||||
PaintableWithLines (BlockContainer<TD>) [40.59375,87 36.265625x78]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [9,127.40625 101.421875x39.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,127.40625 31.59375x39.46875]
|
||||
PaintableBox (Box<TR>) [9,126 101.421875x39]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,126 31.59375x39]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [76.859375,127.40625 33.5625x39.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [76.859375,126 33.5625x39]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,167.875 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,166 784x0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue