1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +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,23 +1,23 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x468.796875 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x452.796875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x21.828125 children: inline
line 0 width: 391.578125, height: 21.828125, bottom: 21.828125, baseline: 16.890625
frag 0 from TextNode start: 0, length: 40, rect: [8,8 391.578125x21.828125]
BlockContainer <html> at (0,0) content-size 800x468.90625 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x452.90625 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x21.84375 children: inline
line 0 width: 391.65625, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 40, rect: [8,8 391.65625x21.84375]
"Variable set by inline style of element:"
TextNode <#text>
BreakNode <br>
TextNode <#text>
BlockContainer <div.a> at (8,29.828125) content-size 784x100 children: inline
BlockContainer <div.a> at (8,29.84375) content-size 784x100 children: inline
line 0 width: 200, height: 100, bottom: 100, baseline: 100
frag 0 from BlockContainer start: 0, length: 0, rect: [8,29.828125 200x100]
BlockContainer <(anonymous)> at (8,29.828125) content-size 200x100 inline-block [BFC] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [8,29.84375 200x100]
BlockContainer <(anonymous)> at (8,29.84375) content-size 200x100 inline-block [BFC] children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,129.828125) content-size 784x65.484375 children: inline
line 0 width: 0, height: 21.828125, bottom: 21.828125, baseline: 16.890625
line 1 width: 0, height: 21.828125, bottom: 43.65625, baseline: 16.890625
line 2 width: 441.21875, height: 21.828125, bottom: 65.484375, baseline: 16.890625
frag 0 from TextNode start: 1, length: 42, rect: [8,173.484375 441.21875x21.828125]
BlockContainer <(anonymous)> at (8,129.84375) content-size 784x65.53125 children: inline
line 0 width: 0, height: 21.84375, bottom: 21.84375, baseline: 16.921875
line 1 width: 0, height: 21.84375, bottom: 43.6875, baseline: 16.921875
line 2 width: 441.28125, height: 21.84375, bottom: 65.53125, baseline: 16.921875
frag 0 from TextNode start: 1, length: 42, rect: [8,173.53125 441.28125x21.84375]
"Variable set by CSS rule matching element:"
TextNode <#text>
BreakNode <br>
@ -25,16 +25,16 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BreakNode <br>
TextNode <#text>
BlockContainer <div.b> at (8,195.3125) content-size 784x100 children: inline
BlockContainer <div.b> at (8,195.375) content-size 784x100 children: inline
line 0 width: 200, height: 100, bottom: 100, baseline: 100
frag 0 from BlockContainer start: 0, length: 0, rect: [8,195.3125 200x100]
BlockContainer <(anonymous)> at (8,195.3125) content-size 200x100 inline-block [BFC] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [8,195.375 200x100]
BlockContainer <(anonymous)> at (8,195.375) content-size 200x100 inline-block [BFC] children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,295.3125) content-size 784x65.484375 children: inline
line 0 width: 0, height: 21.828125, bottom: 21.828125, baseline: 16.890625
line 1 width: 0, height: 21.828125, bottom: 43.65625, baseline: 16.890625
line 2 width: 520.546875, height: 21.828125, bottom: 65.484375, baseline: 16.890625
frag 0 from TextNode start: 1, length: 49, rect: [8,338.96875 520.546875x21.828125]
BlockContainer <(anonymous)> at (8,295.375) content-size 784x65.53125 children: inline
line 0 width: 0, height: 21.84375, bottom: 21.84375, baseline: 16.921875
line 1 width: 0, height: 21.84375, bottom: 43.6875, baseline: 16.921875
line 2 width: 520.625, height: 21.84375, bottom: 65.53125, baseline: 16.921875
frag 0 from TextNode start: 1, length: 49, rect: [8,339.0625 520.625x21.84375]
"Variable set by CSS rule matching pseudo element:"
TextNode <#text>
BreakNode <br>
@ -42,27 +42,27 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BreakNode <br>
TextNode <#text>
BlockContainer <div.c> at (8,360.796875) content-size 784x100 children: inline
BlockContainer <div.c> at (8,360.90625) content-size 784x100 children: inline
line 0 width: 200, height: 100, bottom: 100, baseline: 100
frag 0 from BlockContainer start: 0, length: 0, rect: [8,360.796875 200x100]
BlockContainer <(anonymous)> at (8,360.796875) content-size 200x100 inline-block [BFC] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [8,360.90625 200x100]
BlockContainer <(anonymous)> at (8,360.90625) content-size 200x100 inline-block [BFC] children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,460.796875) content-size 784x0 children: inline
BlockContainer <(anonymous)> at (8,460.90625) content-size 784x0 children: inline
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x468.796875]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x452.796875]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x21.828125]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x468.90625]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x452.90625]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x21.84375]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.a) [8,29.828125 784x100]
PaintableWithLines (BlockContainer(anonymous)) [8,29.828125 200x100]
PaintableWithLines (BlockContainer(anonymous)) [8,129.828125 784x65.484375]
PaintableWithLines (BlockContainer<DIV>.a) [8,29.84375 784x100]
PaintableWithLines (BlockContainer(anonymous)) [8,29.84375 200x100]
PaintableWithLines (BlockContainer(anonymous)) [8,129.84375 784x65.53125]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.b) [8,195.3125 784x100]
PaintableWithLines (BlockContainer(anonymous)) [8,195.3125 200x100]
PaintableWithLines (BlockContainer(anonymous)) [8,295.3125 784x65.484375]
PaintableWithLines (BlockContainer<DIV>.b) [8,195.375 784x100]
PaintableWithLines (BlockContainer(anonymous)) [8,195.375 200x100]
PaintableWithLines (BlockContainer(anonymous)) [8,295.375 784x65.53125]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.c) [8,360.796875 784x100]
PaintableWithLines (BlockContainer(anonymous)) [8,360.796875 200x100]
PaintableWithLines (BlockContainer(anonymous)) [8,460.796875 784x0]
PaintableWithLines (BlockContainer<DIV>.c) [8,360.90625 784x100]
PaintableWithLines (BlockContainer(anonymous)) [8,360.90625 200x100]
PaintableWithLines (BlockContainer(anonymous)) [8,460.90625 784x0]