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

LibWeb: Perform rounding when dividing CSSPixels

This should allow us to produce results that more closely match old
layouts when divisions were done in floating-point.
This commit is contained in:
Zaggy1024 2023-09-03 19:03:03 -05:00 committed by Alexander Kalenik
parent bd85e1b30b
commit 98926b487c
27 changed files with 250 additions and 233 deletions

View file

@ -1,13 +1,13 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x0 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 500x100 positioned [BFC] children: not-inline
BlockContainer <div.image-container> at (261,11) content-size 248x28.46875 positioned [BFC] children: inline
line 0 width: 250, height: 28.46875, bottom: 28.46875, baseline: 28.46875
frag 0 from ImageBox start: 0, length: 0, rect: [262,12 248x26.46875]
ImageBox <img> at (262,12) content-size 248x26.46875 children: not-inline
BlockContainer <div.image-container> at (261,11) content-size 248x28.484375 positioned [BFC] children: inline
line 0 width: 250, height: 28.484375, bottom: 28.484375, baseline: 28.484375
frag 0 from ImageBox start: 0, length: 0, rect: [262,12 248x26.484375]
ImageBox <img> at (262,12) content-size 248x26.484375 children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x2] overflow: [9,9 502x102]
PaintableWithLines (BlockContainer<BODY>) [9,9 502x102]
PaintableWithLines (BlockContainer<DIV>.image-container) [260,10 250x30.46875] overflow: [261,11 249x28.46875]
ImagePaintable (ImageBox<IMG>) [261,11 250x28.46875]
PaintableWithLines (BlockContainer<DIV>.image-container) [260,10 250x30.484375] overflow: [261,11 249x28.484375]
ImagePaintable (ImageBox<IMG>) [261,11 250x28.484375]