1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:47:35 +00:00

LibWeb: Make CSSPixels and Length use 64-bit (double) floating point

This fixes a plethora of rounding problems on many websites.
In the future, we may want to replace this with fixed-point arithmetic
(bug #18566) for performance (and consistency with other engines),
but in the meantime this makes the web look a bit better. :^)

There's a lot more things that could be converted to doubles, which
would reduce the amount of casting necessary in this patch.
We can do that incrementally, however.
This commit is contained in:
Andreas Kling 2023-05-24 10:50:57 +02:00
parent 30262d7023
commit 655d9d1462
80 changed files with 298 additions and 299 deletions

View file

@ -1,6 +1,6 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x70 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x52 flex-container(row) [FFC] children: not-inline
ImageBox <img> at (11,11) content-size 66.666671x50 flex-item children: not-inline
ImageBox <img> at (11,11) content-size 66.666668x50 flex-item children: not-inline
BlockContainer <(anonymous)> at (10,10) content-size 0x0 [BFC] children: inline
TextNode <#text>

View file

@ -4,7 +4,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.flex> at (11,11) content-size 300x200 flex-container(row) [FFC] children: not-inline
BlockContainer <div> at (12,12) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (114,12) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (12,95.333328) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (114,95.333328) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (12,178.666656) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (114,178.666656) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (12,95.333333) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (114,95.333333) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (12,178.666666) content-size 100x20 flex-item [BFC] children: not-inline
BlockContainer <div> at (114,178.666666) content-size 100x20 flex-item [BFC] children: not-inline