1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:57:44 +00:00

AK+LibWeb: Round to int in clamp_to_int instead of truncating

This caused inaccuracies in float->CssPixel conversions
This commit is contained in:
Hendiadyoin1 2023-07-29 15:30:57 +02:00 committed by Alexander Kalenik
parent 7b7ba38655
commit af161a8b83
58 changed files with 693 additions and 692 deletions

View file

@ -4,9 +4,9 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <body> at (8,8) content-size 784x0 children: inline
TextNode <#text>
BlockContainer <h1> at (76.578125,103.734375) content-size 126x38 positioned [BFC] children: inline
line 0 width: 46.515625, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 4, rect: [116.3125,103.734375 46.515625x21.828125]
BlockContainer <h1> at (76.59375,103.765625) content-size 126x38 positioned [BFC] children: inline
line 0 width: 46.53125, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 4, rect: [116.328125,103.765625 46.53125x21.84375]
"Test"
TextNode <#text>
TextNode <#text>
@ -15,5 +15,5 @@ PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
PaintableWithLines (BlockContainer(anonymous)) [0,0 800x0]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
PaintableWithLines (BlockContainer<H1>) [75.578125,58.734375 128x128]
PaintableWithLines (BlockContainer<H1>) [75.59375,58.765625 128x128]
TextPaintable (TextNode<#text>)