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

LibWeb: Implement rounding for PixelUnits

This commit is contained in:
Hendiadyoin1 2023-07-29 16:01:50 +02:00 committed by Alexander Kalenik
parent cc74083f27
commit 6c341ca985
79 changed files with 1638 additions and 1600 deletions

View file

@ -1,34 +1,34 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x244.28125 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x226.28125 children: not-inline
Box <div.outer.flex.flex-wrap> at (11,11) content-size 778x224.28125 flex-container(row) [FFC] children: not-inline
BlockContainer <div.inner> at (12,62) content-size 776x122.28125 flex-item [BFC] children: inline
BlockContainer <html> at (1,1) content-size 798x245.09375 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x227.09375 children: not-inline
Box <div.outer.flex.flex-wrap> at (11,11) content-size 778x225.09375 flex-container(row) [FFC] children: not-inline
BlockContainer <div.inner> at (12,62) content-size 776x123.09375 flex-item [BFC] children: inline
line 0 width: 741.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 90, rect: [12,62 741.640625x17.46875]
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus interdum libero et urna"
line 1 width: 765.03125, height: 17.46875, bottom: 34.9375, baseline: 13.53125
frag 0 from TextNode start: 91, length: 95, rect: [12,79.46875 765.03125x17.46875]
line 1 width: 765.03125, height: 17.9375, bottom: 35.40625, baseline: 13.53125
frag 0 from TextNode start: 91, length: 95, rect: [12,79 765.03125x17.46875]
"sodales auctor. Nullam sodales bibendum turpis quis blandit. Ut fringilla erat et erat laoreet,"
line 2 width: 747.5625, height: 17.46875, bottom: 52.40625, baseline: 13.53125
frag 0 from TextNode start: 187, length: 90, rect: [12,96.9375 747.5625x17.46875]
line 2 width: 747.5625, height: 18.40625, bottom: 53.34375, baseline: 13.53125
frag 0 from TextNode start: 187, length: 90, rect: [12,96 747.5625x17.46875]
"faucibus rhoncus orci hendrerit. Etiam at sagittis diam. Etiam nec neque non dolor iaculis"
line 3 width: 732.109375, height: 17.46875, bottom: 69.875, baseline: 13.53125
frag 0 from TextNode start: 278, length: 90, rect: [12,114.40625 732.109375x17.46875]
line 3 width: 732.109375, height: 17.875, bottom: 70.28125, baseline: 13.53125
frag 0 from TextNode start: 278, length: 90, rect: [12,114 732.109375x17.46875]
"finibus euismod eget erat. Pellentesque vitae purus vitae nisi vehicula vestibulum quis ut"
line 4 width: 759.453125, height: 17.46875, bottom: 87.34375, baseline: 13.53125
frag 0 from TextNode start: 369, length: 95, rect: [12,131.875 759.453125x17.46875]
line 4 width: 759.453125, height: 18.34375, bottom: 88.21875, baseline: 13.53125
frag 0 from TextNode start: 369, length: 95, rect: [12,131 759.453125x17.46875]
"diam. Integer convallis, justo ullamcorper sollicitudin varius, enim enim pellentesque erat, eu"
line 5 width: 767.1875, height: 17.46875, bottom: 104.8125, baseline: 13.53125
frag 0 from TextNode start: 465, length: 94, rect: [12,149.34375 767.1875x17.46875]
line 5 width: 767.1875, height: 17.8125, bottom: 105.15625, baseline: 13.53125
frag 0 from TextNode start: 465, length: 94, rect: [12,149 767.1875x17.46875]
"pellentesque sem arcu eu purus. Phasellus id erat sed felis luctus mollis eget sit amet dolor."
line 6 width: 765.578125, height: 17.46875, bottom: 122.28125, baseline: 13.53125
frag 0 from TextNode start: 560, length: 95, rect: [12,166.8125 765.578125x17.46875]
line 6 width: 765.578125, height: 18.28125, bottom: 123.09375, baseline: 13.53125
frag 0 from TextNode start: 560, length: 95, rect: [12,166 765.578125x17.46875]
"Pellentesque eget justo nulla. Duis consectetur imperdiet nisi, ac tincidunt urna blandit quis."
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x246.28125]
PaintableWithLines (BlockContainer<BODY>) [9,9 782x228.28125]
PaintableBox (Box<DIV>.outer.flex.flex-wrap) [10,10 780x226.28125]
PaintableWithLines (BlockContainer<DIV>.inner) [11,11 778x224.28125]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x247.09375]
PaintableWithLines (BlockContainer<BODY>) [9,9 782x229.09375]
PaintableBox (Box<DIV>.outer.flex.flex-wrap) [10,10 780x227.09375]
PaintableWithLines (BlockContainer<DIV>.inner) [11,11 778x225.09375]
TextPaintable (TextNode<#text>)

View file

@ -9,15 +9,15 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <div.buttons> at (394.625,11) content-size 114.375x50 flex-item [BFC] children: inline
line 0 width: 114.375, height: 19.46875, bottom: 19.46875, baseline: 14.53125
frag 0 from BlockContainer start: 0, length: 0, rect: [395.625,12 57.046875x17.46875]
frag 1 from BlockContainer start: 0, length: 0, rect: [454.671875,12 53.328125x17.46875]
frag 1 from BlockContainer start: 0, length: 0, rect: [454.625,12 53.328125x17.46875]
BlockContainer <div.button> at (395.625,12) content-size 57.046875x17.46875 inline-block [BFC] children: inline
line 0 width: 57.046875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [395.625,12 57.046875x17.46875]
"Accept"
TextNode <#text>
BlockContainer <div.button> at (454.671875,12) content-size 53.328125x17.46875 inline-block [BFC] children: inline
BlockContainer <div.button> at (454.625,12) content-size 53.328125x17.46875 inline-block [BFC] children: inline
line 0 width: 53.328125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [454.671875,12 53.328125x17.46875]
frag 0 from TextNode start: 0, length: 6, rect: [454.625,12 53.328125x17.46875]
"Reject"
TextNode <#text>
@ -28,5 +28,5 @@ PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<DIV>.buttons) [393.625,10 116.375x52]
PaintableWithLines (BlockContainer<DIV>.button) [394.625,11 59.046875x19.46875]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.button) [453.671875,11 55.328125x19.46875]
PaintableWithLines (BlockContainer<DIV>.button) [453.625,11 55.328125x19.46875]
TextPaintable (TextNode<#text>)

View file

@ -1,22 +1,22 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x68.40625 [BFC] children: not-inline
Box <body.pink> at (8,8) content-size 784x52.40625 flex-container(row) [FFC] children: not-inline
Box <div.orange> at (8,8) content-size 194.71875x52.40625 flex-container(row) flex-item [FFC] children: not-inline
BlockContainer <div.lime> at (8,8) content-size 87.359375x52.40625 flex-item [BFC] children: inline
BlockContainer <html> at (0,0) content-size 800x69.34375 [BFC] children: not-inline
Box <body.pink> at (8,8) content-size 784x53.34375 flex-container(row) [FFC] children: not-inline
Box <div.orange> at (8,8) content-size 194.71875x53.34375 flex-container(row) flex-item [FFC] children: not-inline
BlockContainer <div.lime> at (8,8) content-size 87.359375x53.34375 flex-item [BFC] children: inline
line 0 width: 74.75, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 9, rect: [8,8 74.75x17.46875]
"This is a"
line 1 width: 71.828125, height: 17.46875, bottom: 34.9375, baseline: 13.53125
frag 0 from TextNode start: 10, length: 8, rect: [8,25.46875 71.828125x17.46875]
line 1 width: 71.828125, height: 17.9375, bottom: 35.40625, baseline: 13.53125
frag 0 from TextNode start: 10, length: 8, rect: [8,25 71.828125x17.46875]
"bunch of"
line 2 width: 32.140625, height: 17.46875, bottom: 52.40625, baseline: 13.53125
frag 0 from TextNode start: 19, length: 4, rect: [8,42.9375 32.140625x17.46875]
line 2 width: 32.140625, height: 18.40625, bottom: 53.34375, baseline: 13.53125
frag 0 from TextNode start: 19, length: 4, rect: [8,42 32.140625x17.46875]
"text"
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x68.40625]
PaintableBox (Box<BODY>.pink) [8,8 784x52.40625]
PaintableBox (Box<DIV>.orange) [8,8 194.71875x52.40625]
PaintableWithLines (BlockContainer<DIV>.lime) [8,8 87.359375x52.40625]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x69.34375]
PaintableBox (Box<BODY>.pink) [8,8 784x53.34375]
PaintableBox (Box<DIV>.orange) [8,8 194.71875x53.34375]
PaintableWithLines (BlockContainer<DIV>.lime) [8,8 87.359375x53.34375]
TextPaintable (TextNode<#text>)

View file

@ -1,6 +1,6 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x142.8125 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x124.8125 flex-container(column) [FFC] children: not-inline
BlockContainer <html> at (1,1) content-size 798x143.28125 [BFC] children: not-inline
Box <body> at (10,10) content-size 780x125.28125 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.px> at (11,11) content-size 200x19.46875 flex-item [BFC] children: not-inline
@ -39,22 +39,22 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.min-content> at (11,96.875) content-size 62.90625x36.9375 flex-item [BFC] children: not-inline
Box <div.inner> at (12,97.875) content-size 60.90625x34.9375 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (12,97.875) content-size 60.90625x34.9375 flex-item [BFC] children: inline
BlockContainer <div.min-content> at (11,96.875) content-size 62.90625x37.40625 flex-item [BFC] children: not-inline
Box <div.inner> at (12,97.875) content-size 60.90625x35.40625 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (12,97.875) content-size 60.90625x35.40625 flex-item [BFC] children: inline
line 0 width: 26.375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [12,97.875 26.375x17.46875]
"min"
line 1 width: 60.90625, height: 17.46875, bottom: 34.9375, baseline: 13.53125
frag 0 from TextNode start: 4, length: 7, rect: [12,115.34375 60.90625x17.46875]
line 1 width: 60.90625, height: 17.9375, bottom: 35.40625, baseline: 13.53125
frag 0 from TextNode start: 4, length: 7, rect: [12,114.875 60.90625x17.46875]
"content"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x144.8125]
PaintableBox (Box<BODY>) [9,9 782x126.8125]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x145.28125]
PaintableBox (Box<BODY>) [9,9 782x127.28125]
PaintableWithLines (BlockContainer<DIV>.px) [10,10 202x21.46875]
PaintableBox (Box<DIV>.inner) [11,11 200x19.46875]
PaintableWithLines (BlockContainer(anonymous)) [12,12 19.125x17.46875]
@ -71,7 +71,7 @@ PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableBox (Box<DIV>.inner) [11,75.40625 102.15625x19.46875]
PaintableWithLines (BlockContainer(anonymous)) [12,76.40625 100.15625x17.46875]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<DIV>.min-content) [10,95.875 64.90625x38.9375]
PaintableBox (Box<DIV>.inner) [11,96.875 62.90625x36.9375]
PaintableWithLines (BlockContainer(anonymous)) [12,97.875 60.90625x34.9375]
PaintableWithLines (BlockContainer<DIV>.min-content) [10,95.875 64.90625x39.40625]
PaintableBox (Box<DIV>.inner) [11,96.875 62.90625x37.40625]
PaintableWithLines (BlockContainer(anonymous)) [12,97.875 60.90625x35.40625]
TextPaintable (TextNode<#text>)