mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:37:44 +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,43 +1,43 @@
|
|||
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 784x68.875 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 81.4375x68.875 [BFC] children: not-inline
|
||||
Box <table> at (9,9) content-size 79.4375x66.875 table-box [TFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x67 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 81.4375x67 [BFC] children: not-inline
|
||||
Box <table> at (9,9) content-size 79.4375x65 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tbody> at (9,9) content-size 75.4375x60.875 table-row-group children: not-inline
|
||||
Box <tr> at (11,11) content-size 75.4375x21.46875 table-row children: not-inline
|
||||
BlockContainer <td> at (13,13) content-size 71.4375x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 7.9375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [13,13 7.9375x17.46875]
|
||||
Box <tbody> at (9,9) content-size 75.4375x59 table-row-group children: not-inline
|
||||
Box <tr> at (11,11) content-size 75.4375x21 table-row children: not-inline
|
||||
BlockContainer <td> at (13,13) content-size 71.4375x17 table-cell [BFC] children: inline
|
||||
line 0 width: 7.9375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [13,13 7.9375x17]
|
||||
"*"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (11,34.46875) content-size 75.4375x39.40625 table-row children: not-inline
|
||||
BlockContainer <td> at (13,36.46875) content-size 71.4375x35.40625 table-cell [BFC] children: inline
|
||||
line 0 width: 71.4375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [13,36.46875 71.4375x17.46875]
|
||||
Box <tr> at (11,34) content-size 75.4375x38 table-row children: not-inline
|
||||
BlockContainer <td> at (13,36) content-size 71.4375x34 table-cell [BFC] children: inline
|
||||
line 0 width: 71.4375, height: 17, bottom: 17, baseline: 13.296875
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [13,36 71.4375x17]
|
||||
"*********"
|
||||
line 1 width: 63.5625, height: 17.9375, bottom: 35.40625, baseline: 13.53125
|
||||
frag 0 from TextNode start: 10, length: 8, rect: [13,53.46875 63.5625x17.46875]
|
||||
line 1 width: 63.5625, height: 17, bottom: 34, baseline: 13.296875
|
||||
frag 0 from TextNode start: 10, length: 8, rect: [13,53 63.5625x17]
|
||||
"***** **"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,76.875) content-size 784x0 children: inline
|
||||
BlockContainer <(anonymous)> at (8,75) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x68.875]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [8,8 81.4375x68.875]
|
||||
PaintableBox (Box<TABLE>) [8,8 81.4375x68.875]
|
||||
PaintableBox (Box<TBODY>) [9,9 75.4375x60.875] overflow: [9,9 77.4375x64.875]
|
||||
PaintableBox (Box<TR>) [11,11 75.4375x21.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [11,11 75.4375x21.46875]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x67]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [8,8 81.4375x67]
|
||||
PaintableBox (Box<TABLE>) [8,8 81.4375x67]
|
||||
PaintableBox (Box<TBODY>) [9,9 75.4375x59] overflow: [9,9 77.4375x63]
|
||||
PaintableBox (Box<TR>) [11,11 75.4375x21]
|
||||
PaintableWithLines (BlockContainer<TD>) [11,11 75.4375x21]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [11,34.46875 75.4375x39.40625]
|
||||
PaintableWithLines (BlockContainer<TD>) [11,34.46875 75.4375x39.40625]
|
||||
PaintableBox (Box<TR>) [11,34 75.4375x38]
|
||||
PaintableWithLines (BlockContainer<TD>) [11,34 75.4375x38]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,76.875 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,75 784x0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue