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,4 +1,4 @@
b.offsetTop: 8
b.offsetLeft: 8
b.offsetWidth: 784
b.offsetHeight: 51
b.offsetHeight: 54

View file

@ -52,9 +52,9 @@ Test embed.vspace = "120." maps to marginBottom: 120px
Test embed.width = "100" maps to width: 0px
Test embed.width = " 00110 " maps to width: 0px
Test embed.width = "120." maps to width: 0px
Test embed.height = "100" maps to height: 17px
Test embed.height = " 00110 " maps to height: 17px
Test embed.height = "120." maps to height: 17px
Test embed.height = "100" maps to height: 18px
Test embed.height = " 00110 " maps to height: 18px
Test embed.height = "120." maps to height: 18px
Test tr.height = "100" maps to height: 100px
Test tr.height = " 00110 " maps to height: 110px
Test tr.height = "120." maps to height: 120px

View file

@ -84,7 +84,7 @@ background-position-x: 0%
background-position-y: 0%
background-repeat: repeat
background-size: auto auto
block-size: 1204px
block-size: 1290px
border-block-end-color: rgb(0, 0, 0)
border-block-end-style: none
border-block-end-width: medium
@ -149,7 +149,7 @@ grid-row-start: auto
grid-template-areas: none
grid-template-columns: none
grid-template-rows: none
height: 2114px
height: 2265px
inline-size: 784px
inset-block-end: auto
inset-block-start: auto

View file

@ -1 +1 @@
Bounding Client Rect: top=50, left=10, width=500, height=57
Bounding Client Rect: top=50, left=10, width=500, height=58

View file

@ -1,2 +1,2 @@
{"0":{"x":8,"y":500,"width":784,"height":150,"top":500,"right":792,"bottom":650,"left":8}}
{"0":{"x":8,"y":650,"width":41.296875,"height":17,"top":650,"right":49.296875,"bottom":667,"left":8}}
{"0":{"x":8,"y":650,"width":41.296875,"height":18,"top":650,"right":49.296875,"bottom":668,"left":8}}

View file

@ -1,2 +1,2 @@
{"x":8,"y":500,"width":784,"height":150,"top":500,"right":792,"bottom":650,"left":8}
{"x":8,"y":650,"width":41.296875,"height":17,"top":650,"right":49.296875,"bottom":667,"left":8}
{"x":8,"y":650,"width":41.296875,"height":18,"top":650,"right":49.296875,"bottom":668,"left":8}

View file

@ -1 +1 @@
The page has been scrolled to y: 563
The page has been scrolled to y: 565

View file

@ -1 +1 @@
{"x":8,"y":8,"width":784,"height":17,"top":8,"right":792,"bottom":25,"left":8}
{"x":8,"y":8,"width":784,"height":18,"top":8,"right":792,"bottom":26,"left":8}