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

@ -12,9 +12,9 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> at (10,31.46875) content-size 780x0 children: inline
TextNode <#text>
Box <div.grid.center> at (11,32.46875) content-size 778x19.46875 [GFC] children: not-inline
BlockContainer <div> at (373.46875,33.46875) content-size 53.046875x17.46875 [BFC] children: inline
BlockContainer <div> at (373.484375,33.46875) content-size 53.046875x17.46875 [BFC] children: inline
line 0 width: 53.046875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [373.46875,33.46875 53.046875x17.46875]
frag 0 from TextNode start: 0, length: 6, rect: [373.484375,33.46875 53.046875x17.46875]
"Center"
TextNode <#text>
BlockContainer <(anonymous)> at (10,52.9375) content-size 780x0 children: inline
@ -35,7 +35,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer(anonymous)) [10,31.46875 780x0]
PaintableBox (Box<DIV>.grid.center) [10,31.46875 780x21.46875]
PaintableWithLines (BlockContainer<DIV>) [372.46875,32.46875 55.046875x19.46875]
PaintableWithLines (BlockContainer<DIV>) [372.484375,32.46875 55.046875x19.46875]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer(anonymous)) [10,52.9375 780x0]
PaintableBox (Box<DIV>.grid.end) [10,52.9375 780x21.46875]