1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:27:45 +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,21 +1,21 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x65.640625 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x47.640625 [GFC] children: not-inline
BlockContainer <html> at (1,1) content-size 798x65.65625 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x47.65625 [GFC] children: not-inline
BlockContainer <div.foo> at (11,11) content-size 778x21.8125 [BFC] children: inline
line 0 width: 33.9375, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 3, rect: [11,11 33.9375x21.828125]
line 0 width: 33.9375, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 3, rect: [11,11 33.9375x21.84375]
"foo"
TextNode <#text>
BlockContainer <div.bar> at (11,34.8125) content-size 778x21.828125 [BFC] children: inline
line 0 width: 34.546875, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 3, rect: [11,34.8125 34.546875x21.828125]
BlockContainer <div.bar> at (11,34.8125) content-size 778x21.84375 [BFC] children: inline
line 0 width: 34.546875, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 3, rect: [11,34.8125 34.546875x21.84375]
"bar"
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x67.640625]
PaintableBox (Box<BODY>) [9,9 782x49.640625]
PaintableWithLines (BlockContainer<DIV>.foo) [10,10 780x23.8125] overflow: [11,11 778x21.828125]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x67.65625]
PaintableBox (Box<BODY>) [9,9 782x49.65625]
PaintableWithLines (BlockContainer<DIV>.foo) [10,10 780x23.8125] overflow: [11,11 778x21.84375]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.bar) [10,33.8125 780x23.84375]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.bar) [10,33.8125 780x23.828125]
TextPaintable (TextNode<#text>)