1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +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

@ -1,12 +1,12 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x37.828125 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x21.828125 children: inline
line 0 width: 362.59375, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 35, rect: [8,8 362.59375x21.828125]
BlockContainer <html> at (0,0) content-size 800x37.84375 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x21.84375 children: inline
line 0 width: 362.609375, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 35, rect: [8,8 362.609375x21.84375]
"This test passes if we don't crash."
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x37.828125]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x21.828125]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x37.84375]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x21.84375]
TextPaintable (TextNode<#text>)