1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 18:37:35 +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

@ -4,11 +4,11 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x24 [GFC] children: not-inline
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.wrapper> at (8,8) content-size 64.03125x24 [BFC] children: inline
line 0 width: 64.03125, height: 24, bottom: 24, baseline: 24
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 64.03125x24]
BlockContainer <div.wrapper> at (8,8) content-size 64.015625x24 [BFC] children: inline
line 0 width: 64.015625, height: 24, bottom: 24, baseline: 24
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 64.015625x24]
TextNode <#text>
ImageBox <img> at (8,8) content-size 64.03125x24 children: not-inline
ImageBox <img> at (8,8) content-size 64.015625x24 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
@ -17,5 +17,5 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x24]
PaintableBox (Box<DIV>.grid-container) [8,8 784x24]
PaintableWithLines (BlockContainer<DIV>.wrapper) [8,8 64.03125x24]
ImagePaintable (ImageBox<IMG>) [8,8 64.03125x24]
PaintableWithLines (BlockContainer<DIV>.wrapper) [8,8 64.015625x24]
ImagePaintable (ImageBox<IMG>) [8,8 64.015625x24]