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

@ -3,23 +3,23 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <body> at (10,10) content-size 780x62 children: not-inline
Box <div.flex-container> at (11,11) content-size 778x60 flex-container(row) [FFC] children: not-inline
BlockContainer <div.flex-item> at (12,12) content-size 386x28 flex-item [BFC] children: inline
line 0 width: 58.390625, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 6, rect: [12,12 58.390625x21.828125]
line 0 width: 58.40625, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 6, rect: [12,12 58.40625x21.84375]
"Item 1"
TextNode <#text>
BlockContainer <div.flex-item> at (401,12) content-size 386x28 flex-item [BFC] children: inline
line 0 width: 61.484375, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 6, rect: [401,12 61.484375x21.828125]
line 0 width: 61.484375, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 6, rect: [401,12 61.484375x21.84375]
"Item 2"
TextNode <#text>
BlockContainer <div.flex-item> at (12,42) content-size 386x28 flex-item [BFC] children: inline
line 0 width: 61.828125, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 6, rect: [12,42 61.828125x21.828125]
line 0 width: 61.84375, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 6, rect: [12,42 61.84375x21.84375]
"Item 3"
TextNode <#text>
BlockContainer <div.flex-item> at (401,42) content-size 386x28 flex-item [BFC] children: inline
line 0 width: 60.15625, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 6, rect: [401,42 60.15625x21.828125]
line 0 width: 60.15625, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 6, rect: [401,42 60.15625x21.84375]
"Item 4"
TextNode <#text>