LibWeb: Scale font size by 1.15 for line-height: normal

Browsers such as Chrome and Firefox apply an arbitrary scale to the
current font size if `normal` is used for `line-height`. Firefox uses
1.2 while Chrome uses 1.15. Let's go with the latter for now, it's
relatively easy to change if we ever want to go back on that decision.

This also requires updating the expectations for a lot of layout tests.
The upside of this is that it's a bit easier to compare our layout
results to other browsers', especially Chrome.
This commit is contained in:
Jelle Raaijmakers 2025-04-04 15:08:15 +02:00 committed by Andreas Kling
commit 71665fa504
Notes: github-actions[bot] 2025-05-05 11:16:57 +00:00
523 changed files with 8103 additions and 8060 deletions

View file

@ -1,71 +1,71 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x60 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x44 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 600x44 [BFC] children: not-inline
Box <table> at (9,9) content-size 598x42 table-box [TFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x62 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x46 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 600x46 [BFC] children: not-inline
Box <table> at (9,9) content-size 598x44 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
Box <tbody> at (9,9) content-size 598x42 table-row-group children: not-inline
Box <tr> at (9,9) content-size 598x21 table-row children: not-inline
Box <tbody> at (9,9) content-size 598x44 table-row-group children: not-inline
Box <tr> at (9,9) content-size 598x22 table-row children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,11) content-size 58.578125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (11,11) content-size 58.578125x17 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [11,11 26.078125x17] baseline: 13.296875
BlockContainer <td> at (11,11) content-size 58.578125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (11,11) content-size 58.578125x18 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [11,11 26.078125x18] baseline: 13.796875
"cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (73.578125,11) content-size 58.578125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (73.578125,11) content-size 58.578125x17 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [73.578125,11 26.078125x17] baseline: 13.296875
BlockContainer <td> at (73.578125,11) content-size 58.578125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (73.578125,11) content-size 58.578125x18 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [73.578125,11 26.078125x18] baseline: 13.796875
"cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (136.15625,11) content-size 116.53125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (136.15625,11) content-size 116.53125x17 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [136.15625,11 94.96875x17] baseline: 13.296875
BlockContainer <td> at (136.15625,11) content-size 116.53125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (136.15625,11) content-size 116.53125x18 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [136.15625,11 94.96875x18] baseline: 13.796875
"A table cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (256.6875,11) content-size 348.3125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (256.6875,11) content-size 348.3125x17 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [256.6875,11 94.96875x17] baseline: 13.296875
BlockContainer <td> at (256.6875,11) content-size 348.3125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (256.6875,11) content-size 348.3125x18 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [256.6875,11 94.96875x18] baseline: 13.796875
"A table cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
Box <tr> at (9,30) content-size 598x21 table-row children: not-inline
Box <tr> at (9,31) content-size 598x22 table-row children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,32) content-size 58.578125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (11,32) content-size 58.578125x17 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [11,32 26.078125x17] baseline: 13.296875
BlockContainer <td> at (11,33) content-size 58.578125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (11,33) content-size 58.578125x18 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [11,33 26.078125x18] baseline: 13.796875
"cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (73.578125,32) content-size 58.578125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (73.578125,32) content-size 58.578125x17 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [73.578125,32 26.078125x17] baseline: 13.296875
BlockContainer <td> at (73.578125,33) content-size 58.578125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (73.578125,33) content-size 58.578125x18 children: inline
frag 0 from TextNode start: 0, length: 4, rect: [73.578125,33 26.078125x18] baseline: 13.796875
"cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (136.15625,32) content-size 116.53125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (136.15625,32) content-size 116.53125x17 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [136.15625,32 94.96875x17] baseline: 13.296875
BlockContainer <td> at (136.15625,33) content-size 116.53125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (136.15625,33) content-size 116.53125x18 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [136.15625,33 94.96875x18] baseline: 13.796875
"A table cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (256.6875,32) content-size 348.3125x17 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (256.6875,32) content-size 348.3125x17 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [256.6875,32 94.96875x17] baseline: 13.296875
BlockContainer <td> at (256.6875,33) content-size 348.3125x18 table-cell [BFC] children: not-inline
BlockContainer <(anonymous)> at (256.6875,33) content-size 348.3125x18 children: inline
frag 0 from TextNode start: 0, length: 12, rect: [256.6875,33 94.96875x18] baseline: 13.796875
"A table cell"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -74,34 +74,34 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x60]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x44]
PaintableWithLines (TableWrapper(anonymous)) [8,8 600x44]
PaintableBox (Box<TABLE>) [8,8 600x44]
PaintableBox (Box<TBODY>) [9,9 598x42]
PaintableBox (Box<TR>) [9,9 598x21]
PaintableWithLines (BlockContainer<TD>) [9,9 62.578125x21]
PaintableWithLines (BlockContainer(anonymous)) [11,11 58.578125x17]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x62]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x46]
PaintableWithLines (TableWrapper(anonymous)) [8,8 600x46]
PaintableBox (Box<TABLE>) [8,8 600x46]
PaintableBox (Box<TBODY>) [9,9 598x44]
PaintableBox (Box<TR>) [9,9 598x22]
PaintableWithLines (BlockContainer<TD>) [9,9 62.578125x22]
PaintableWithLines (BlockContainer(anonymous)) [11,11 58.578125x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TD>) [71.578125,9 62.578125x21]
PaintableWithLines (BlockContainer(anonymous)) [73.578125,11 58.578125x17]
PaintableWithLines (BlockContainer<TD>) [71.578125,9 62.578125x22]
PaintableWithLines (BlockContainer(anonymous)) [73.578125,11 58.578125x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TD>) [134.15625,9 120.53125x21]
PaintableWithLines (BlockContainer(anonymous)) [136.15625,11 116.53125x17]
PaintableWithLines (BlockContainer<TD>) [134.15625,9 120.53125x22]
PaintableWithLines (BlockContainer(anonymous)) [136.15625,11 116.53125x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TD>) [254.6875,9 352.3125x21]
PaintableWithLines (BlockContainer(anonymous)) [256.6875,11 348.3125x17]
PaintableWithLines (BlockContainer<TD>) [254.6875,9 352.3125x22]
PaintableWithLines (BlockContainer(anonymous)) [256.6875,11 348.3125x18]
TextPaintable (TextNode<#text>)
PaintableBox (Box<TR>) [9,30 598x21]
PaintableWithLines (BlockContainer<TD>) [9,30 62.578125x21]
PaintableWithLines (BlockContainer(anonymous)) [11,32 58.578125x17]
PaintableBox (Box<TR>) [9,31 598x22]
PaintableWithLines (BlockContainer<TD>) [9,31 62.578125x22]
PaintableWithLines (BlockContainer(anonymous)) [11,33 58.578125x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TD>) [71.578125,30 62.578125x21]
PaintableWithLines (BlockContainer(anonymous)) [73.578125,32 58.578125x17]
PaintableWithLines (BlockContainer<TD>) [71.578125,31 62.578125x22]
PaintableWithLines (BlockContainer(anonymous)) [73.578125,33 58.578125x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TD>) [134.15625,30 120.53125x21]
PaintableWithLines (BlockContainer(anonymous)) [136.15625,32 116.53125x17]
PaintableWithLines (BlockContainer<TD>) [134.15625,31 120.53125x22]
PaintableWithLines (BlockContainer(anonymous)) [136.15625,33 116.53125x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TD>) [254.6875,30 352.3125x21]
PaintableWithLines (BlockContainer(anonymous)) [256.6875,32 348.3125x17]
PaintableWithLines (BlockContainer<TD>) [254.6875,31 352.3125x22]
PaintableWithLines (BlockContainer(anonymous)) [256.6875,33 348.3125x18]
TextPaintable (TextNode<#text>)