1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 18:57:36 +00:00

LibWeb: Use fixed-point saturated arithmetics for CSSPixels

Using fixed-point saturated arithmetics for CSSPixels allows to avoid
accumulating floating-point errors.

This implementation is not complete yet: currently saturated
arithmetics implemented only for addition. But it is enough to not
regress any of layout tests we have :)

See https://github.com/SerenityOS/serenity/issues/18566
This commit is contained in:
Aliaksandr Kalenik 2023-07-23 01:09:39 +02:00 committed by Andreas Kling
parent 5cdd03fc53
commit bec07d4af7
136 changed files with 1938 additions and 1844 deletions

View file

@ -1,20 +1,20 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x216 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x200 children: inline
line 0 width: 424, height: 200, bottom: 200, baseline: 159.960937
BlockContainer <html> at (0,0) content-size 800x215.984375 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x199.984375 children: inline
line 0 width: 424, height: 199.984375, bottom: 199.984375, baseline: 159.953125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 79.296875x200]
"1"
frag 1 from TextNode start: 0, length: 1, rect: [87,154 8x17.46875]
frag 1 from TextNode start: 0, length: 1, rect: [87.296875,154.421875 8x17.46875]
" "
frag 2 from TextNode start: 0, length: 1, rect: [95,8 110.15625x200]
frag 2 from TextNode start: 0, length: 1, rect: [95.296875,8 110.15625x200]
"2"
frag 3 from TextNode start: 0, length: 1, rect: [205,154 8x17.46875]
frag 3 from TextNode start: 0, length: 1, rect: [205.453125,154.421875 8x17.46875]
" "
frag 4 from TextNode start: 0, length: 1, rect: [213,8 113.671875x200]
frag 4 from TextNode start: 0, length: 1, rect: [213.453125,8 113.671875x200]
"3"
frag 5 from TextNode start: 0, length: 1, rect: [327,154 8x17.46875]
frag 5 from TextNode start: 0, length: 1, rect: [327.125,154.421875 8x17.46875]
" "
frag 6 from TextNode start: 0, length: 1, rect: [335,8 96.875x200]
frag 6 from TextNode start: 0, length: 1, rect: [335.125,8 96.875x200]
"4"
InlineNode <span.one>
TextNode <#text>