mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 08:17:34 +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,38 +1,38 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x127.8125 [BFC] children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x125 [BFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <body> at (8,8) content-size 784x111.8125 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 63.046875x111.8125 [BFC] children: not-inline
|
||||
Box <table#full-table> at (10,43.40625) content-size 59.046875x72.40625 table-box [TFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x109 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 63.046875x109 [BFC] children: not-inline
|
||||
Box <table#full-table> at (10,42) content-size 59.046875x71 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <caption> at (8,8) content-size 59.046875x35.40625 [BFC] children: inline
|
||||
line 0 width: 54.03125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 1, length: 6, rect: [11,8 54.03125x17.46875]
|
||||
BlockContainer <caption> at (8,8) content-size 59.046875x34 [BFC] children: inline
|
||||
line 0 width: 54.03125, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 1, length: 6, rect: [11,8 54.03125x17]
|
||||
"A long"
|
||||
line 1 width: 59.046875, height: 17.9375, bottom: 35.40625, baseline: 13.53125
|
||||
frag 0 from TextNode start: 8, length: 7, rect: [8,25 59.046875x17.46875]
|
||||
line 1 width: 59.046875, height: 17, bottom: 34, baseline: 13.296875
|
||||
frag 0 from TextNode start: 8, length: 7, rect: [8,25 59.046875x17]
|
||||
"caption"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <thead> at (10,10) content-size 53.046875x21.46875 table-header-group children: not-inline
|
||||
Box <thead> at (10,10) content-size 53.046875x21 table-header-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (12,45.40625) content-size 53.046875x21.46875 table-row children: not-inline
|
||||
Box <tr> at (12,44) content-size 53.046875x21 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (14,47.40625) content-size 21.25x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 20.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [14,47.40625 20.609375x17.46875]
|
||||
BlockContainer <td> at (14,46) content-size 21.25x17 table-cell [BFC] children: inline
|
||||
line 0 width: 20.609375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [14,46 20.609375x17]
|
||||
"A1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (41.25,47.40625) content-size 23.796875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 23.078125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [41.25,47.40625 23.078125x17.46875]
|
||||
BlockContainer <td> at (41.25,46) content-size 23.796875x17 table-cell [BFC] children: inline
|
||||
line 0 width: 23.078125, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [41.25,46 23.078125x17]
|
||||
"A2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
|
@ -41,22 +41,22 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tbody> at (10,31.46875) content-size 53.046875x21.46875 table-row-group children: not-inline
|
||||
Box <tbody> at (10,31) content-size 53.046875x21 table-row-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (12,68.875) content-size 53.046875x21.46875 table-row children: not-inline
|
||||
Box <tr> at (12,67) content-size 53.046875x21 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (14,70.875) content-size 21.25x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 15.6875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [14,70.875 15.6875x17.46875]
|
||||
BlockContainer <td> at (14,69) content-size 21.25x17 table-cell [BFC] children: inline
|
||||
line 0 width: 15.6875, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [14,69 15.6875x17]
|
||||
"B1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (41.25,70.875) content-size 23.796875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 18.15625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [41.25,70.875 18.15625x17.46875]
|
||||
BlockContainer <td> at (41.25,69) content-size 23.796875x17 table-cell [BFC] children: inline
|
||||
line 0 width: 18.15625, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [41.25,69 18.15625x17]
|
||||
"B2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
|
@ -65,22 +65,22 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tfoot> at (10,52.9375) content-size 53.046875x21.46875 table-footer-group children: not-inline
|
||||
Box <tfoot> at (10,52) content-size 53.046875x21 table-footer-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (12,92.34375) content-size 53.046875x21.46875 table-row children: not-inline
|
||||
Box <tr> at (12,90) content-size 53.046875x21 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (14,94.34375) content-size 21.25x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 18.890625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [14,94.34375 18.890625x17.46875]
|
||||
BlockContainer <td> at (14,92) content-size 21.25x17 table-cell [BFC] children: inline
|
||||
line 0 width: 18.890625, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [14,92 18.890625x17]
|
||||
"F1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (41.25,94.34375) content-size 23.796875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 21.359375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [41.25,94.34375 21.359375x17.46875]
|
||||
BlockContainer <td> at (41.25,92) content-size 23.796875x17 table-cell [BFC] children: inline
|
||||
line 0 width: 21.359375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [41.25,92 21.359375x17]
|
||||
"F2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
|
@ -89,33 +89,33 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,119.8125) content-size 784x0 children: inline
|
||||
BlockContainer <(anonymous)> at (8,117) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x127.8125]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x125]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [0,0 800x0]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x111.8125]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [8,8 63.046875x111.8125]
|
||||
PaintableBox (Box<TABLE>#full-table) [8,41.40625 63.046875x76.40625] overflow: [8,8 61.046875x107.8125]
|
||||
PaintableWithLines (BlockContainer<CAPTION>) [8,8 59.046875x35.40625]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x109]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [8,8 63.046875x109]
|
||||
PaintableBox (Box<TABLE>#full-table) [8,40 63.046875x75] overflow: [8,8 61.046875x105]
|
||||
PaintableWithLines (BlockContainer<CAPTION>) [8,8 59.046875x34]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<THEAD>) [10,10 53.046875x21.46875] overflow: [10,10 57.046875x56.875]
|
||||
PaintableBox (Box<TR>) [12,45.40625 53.046875x21.46875] overflow: [12,45.40625 55.046875x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [12,45.40625 25.25x21.46875]
|
||||
PaintableBox (Box<THEAD>) [10,10 53.046875x21] overflow: [10,10 57.046875x55]
|
||||
PaintableBox (Box<TR>) [12,44 53.046875x21] overflow: [12,44 55.046875x21]
|
||||
PaintableWithLines (BlockContainer<TD>) [12,44 25.25x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [39.25,45.40625 27.796875x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [39.25,44 27.796875x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TBODY>) [10,31.46875 53.046875x21.46875] overflow: [10,31.46875 57.046875x58.875]
|
||||
PaintableBox (Box<TR>) [12,68.875 53.046875x21.46875] overflow: [12,68.875 55.046875x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [12,68.875 25.25x21.46875]
|
||||
PaintableBox (Box<TBODY>) [10,31 53.046875x21] overflow: [10,31 57.046875x57]
|
||||
PaintableBox (Box<TR>) [12,67 53.046875x21] overflow: [12,67 55.046875x21]
|
||||
PaintableWithLines (BlockContainer<TD>) [12,67 25.25x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [39.25,68.875 27.796875x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [39.25,67 27.796875x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TFOOT>) [10,52.9375 53.046875x21.46875] overflow: [10,52.9375 57.046875x60.875]
|
||||
PaintableBox (Box<TR>) [12,92.34375 53.046875x21.46875] overflow: [12,92.34375 55.046875x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [12,92.34375 25.25x21.46875]
|
||||
PaintableBox (Box<TFOOT>) [10,52 53.046875x21] overflow: [10,52 57.046875x59]
|
||||
PaintableBox (Box<TR>) [12,90 53.046875x21] overflow: [12,90 55.046875x21]
|
||||
PaintableWithLines (BlockContainer<TD>) [12,90 25.25x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [39.25,92.34375 27.796875x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [39.25,90 27.796875x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,119.8125 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,117 784x0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue