1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:37:44 +00:00

LibWeb: Use CSSPixelFraction to represent aspect ratios

This allows us to retain perfect precision for aspect ratios derived
from either the intrinsic sizes of replaced elements, or the
`aspect-ratio` CSS property.
This commit is contained in:
Zaggy1024 2023-09-03 17:33:58 -05:00 committed by Andreas Kling
parent 4fb209d25f
commit 34c5043cbe
22 changed files with 57 additions and 55 deletions

View file

@ -1,11 +1,11 @@
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.671875x50 flex-item children: not-inline
BlockContainer <html> at (1,1) content-size 798x69.96875 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x51.96875 flex-container(row) [FFC] children: not-inline
ImageBox <img> at (11,11) content-size 66.65625x49.984375 flex-item children: not-inline
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x72]
PaintableBox (Box<BODY>) [9,9 782x54]
ImagePaintable (ImageBox<IMG>) [10,10 68.671875x52]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x71.96875]
PaintableBox (Box<BODY>) [9,9 782x53.96875] overflow: [10,10 780x51.984375]
ImagePaintable (ImageBox<IMG>) [10,10 68.65625x51.984375]

View file

@ -1,21 +1,21 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x24.015625 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x24.015625 [GFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x24 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.015625 [BFC] children: inline
line 0 width: 64.03125, height: 24.015625, bottom: 24.015625, baseline: 24.015625
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 64.03125x24.015625]
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]
TextNode <#text>
ImageBox <img> at (8,8) content-size 64.03125x24.015625 children: not-inline
ImageBox <img> at (8,8) content-size 64.03125x24 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x24.015625]
PaintableBox (Box<DIV>.grid-container) [8,8 784x24.015625]
PaintableWithLines (BlockContainer<DIV>.wrapper) [8,8 64.03125x24.015625]
ImagePaintable (ImageBox<IMG>) [8,8 64.03125x24.015625]
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]