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

LibWeb: Use separate structure to represent fragments in paintable tree

This is a part of refactoring towards making the paintable tree
independent of the layout tree. Now, instead of transferring text
fragments from the layout tree to the paintable tree during the layout
commit phase, we allocate separate PaintableFragments that contain only
the information necessary for painting. Doing this also allows us to
get rid LineBoxes, as they are used only during layout.
This commit is contained in:
Aliaksandr Kalenik 2024-01-12 21:25:05 +01:00 committed by Andreas Kling
parent 785fa60cca
commit de32b77ceb
401 changed files with 2122 additions and 3614 deletions

View file

@ -5,288 +5,240 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
Box <div.row.outer.start> at (11,11) content-size 300x60 flex-container(row) [FFC] children: not-inline
BlockContainer <div> at (60,12) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 41.234375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [60,12 41.234375x17]
frag 0 from TextNode start: 0, length: 5, rect: [60,12 41.234375x17] baseline: 13.296875
"start"
TextNode <#text>
BlockContainer <div> at (160,12) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [160,12 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [160,12 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (260,12) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [260,12 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [260,12 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,72) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.outer.flex-start> at (11,73) content-size 300x60 flex-container(row) [FFC] children: not-inline
BlockContainer <div> at (60,74) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 76.8125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 10, rect: [60,74 76.8125x17]
frag 0 from TextNode start: 0, length: 10, rect: [60,74 76.8125x17] baseline: 13.296875
"flex-start"
TextNode <#text>
BlockContainer <div> at (160,74) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [160,74 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [160,74 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (260,74) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [260,74 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [260,74 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,134) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.outer.end> at (11,135) content-size 300x60 flex-container(row) [FFC] children: not-inline
BlockContainer <div> at (12,136) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 26.1875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 3, rect: [12,136 26.1875x17]
frag 0 from TextNode start: 0, length: 3, rect: [12,136 26.1875x17] baseline: 13.296875
"end"
TextNode <#text>
BlockContainer <div> at (112,136) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [112,136 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [112,136 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (212,136) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [212,136 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [212,136 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,196) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.outer.flex-end> at (11,197) content-size 300x60 flex-container(row) [FFC] children: not-inline
BlockContainer <div> at (12,198) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 61.765625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [12,198 61.765625x17]
frag 0 from TextNode start: 0, length: 8, rect: [12,198 61.765625x17] baseline: 13.296875
"flex-end"
TextNode <#text>
BlockContainer <div> at (112,198) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [112,198 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [112,198 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (212,198) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [212,198 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [212,198 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,258) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.reverse.outer.start> at (11,259) content-size 300x60 flex-container(row-reverse) [FFC] children: not-inline
BlockContainer <div> at (260,260) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 41.234375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [260,260 41.234375x17]
frag 0 from TextNode start: 0, length: 5, rect: [260,260 41.234375x17] baseline: 13.296875
"start"
TextNode <#text>
BlockContainer <div> at (160,260) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [160,260 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [160,260 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (60,260) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [60,260 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [60,260 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,320) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.reverse.outer.flex-start> at (11,321) content-size 300x60 flex-container(row-reverse) [FFC] children: not-inline
BlockContainer <div> at (260,322) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 76.8125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 10, rect: [260,322 76.8125x17]
frag 0 from TextNode start: 0, length: 10, rect: [260,322 76.8125x17] baseline: 13.296875
"flex-start"
TextNode <#text>
BlockContainer <div> at (160,322) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [160,322 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [160,322 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (60,322) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [60,322 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [60,322 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,382) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.reverse.outer.end> at (11,383) content-size 300x60 flex-container(row-reverse) [FFC] children: not-inline
BlockContainer <div> at (212,384) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 26.1875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 3, rect: [212,384 26.1875x17]
frag 0 from TextNode start: 0, length: 3, rect: [212,384 26.1875x17] baseline: 13.296875
"end"
TextNode <#text>
BlockContainer <div> at (112,384) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [112,384 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [112,384 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (12,384) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,384 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,384 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,444) content-size 780x0 children: inline
TextNode <#text>
Box <div.row.reverse.outer.flex-end> at (11,445) content-size 300x60 flex-container(row-reverse) [FFC] children: not-inline
BlockContainer <div> at (212,446) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 61.765625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [212,446 61.765625x17]
frag 0 from TextNode start: 0, length: 8, rect: [212,446 61.765625x17] baseline: 13.296875
"flex-end"
TextNode <#text>
BlockContainer <div> at (112,446) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [112,446 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [112,446 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (12,446) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,446 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,446 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,506) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.outer.start> at (11,507) content-size 60x300 flex-container(column) [FFC] children: not-inline
BlockContainer <div> at (20,508) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 41.234375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [20,508 41.234375x17]
frag 0 from TextNode start: 0, length: 5, rect: [20,508 41.234375x17] baseline: 13.296875
"start"
TextNode <#text>
BlockContainer <div> at (20,560) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,560 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,560 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (20,612) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,612 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,612 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,808) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.outer.flex-start> at (11,809) content-size 60x300 flex-container(column) [FFC] children: not-inline
BlockContainer <div> at (20,810) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 76.8125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 10, rect: [20,810 76.8125x17]
frag 0 from TextNode start: 0, length: 10, rect: [20,810 76.8125x17] baseline: 13.296875
"flex-start"
TextNode <#text>
BlockContainer <div> at (20,862) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,862 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,862 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (20,914) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,914 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,914 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,1110) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.outer.end> at (11,1111) content-size 60x300 flex-container(column) [FFC] children: not-inline
BlockContainer <div> at (12,1256) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 26.1875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 3, rect: [12,1256 26.1875x17]
frag 0 from TextNode start: 0, length: 3, rect: [12,1256 26.1875x17] baseline: 13.296875
"end"
TextNode <#text>
BlockContainer <div> at (12,1308) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,1308 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,1308 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (12,1360) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,1360 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,1360 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,1412) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.outer.flex-end> at (11,1413) content-size 60x300 flex-container(column) [FFC] children: not-inline
BlockContainer <div> at (12,1558) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 61.765625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [12,1558 61.765625x17]
frag 0 from TextNode start: 0, length: 8, rect: [12,1558 61.765625x17] baseline: 13.296875
"flex-end"
TextNode <#text>
BlockContainer <div> at (12,1610) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,1610 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,1610 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (12,1662) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,1662 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,1662 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,1714) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.reverse.outer.start> at (11,1715) content-size 60x300 flex-container(column-reverse) [FFC] children: not-inline
BlockContainer <div> at (20,1820) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 41.234375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [20,1820 41.234375x17]
frag 0 from TextNode start: 0, length: 5, rect: [20,1820 41.234375x17] baseline: 13.296875
"start"
TextNode <#text>
BlockContainer <div> at (20,1768) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,1768 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,1768 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (20,1716) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,1716 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,1716 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,2016) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.reverse.outer.flex-start> at (11,2017) content-size 60x300 flex-container(column-reverse) [FFC] children: not-inline
BlockContainer <div> at (20,2266) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 76.8125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 10, rect: [20,2266 76.8125x17]
frag 0 from TextNode start: 0, length: 10, rect: [20,2266 76.8125x17] baseline: 13.296875
"flex-start"
TextNode <#text>
BlockContainer <div> at (20,2214) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,2214 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,2214 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (20,2162) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [20,2162 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [20,2162 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,2318) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.reverse.outer.end> at (11,2319) content-size 60x300 flex-container(column-reverse) [FFC] children: not-inline
BlockContainer <div> at (12,2568) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 26.1875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 3, rect: [12,2568 26.1875x17]
frag 0 from TextNode start: 0, length: 3, rect: [12,2568 26.1875x17] baseline: 13.296875
"end"
TextNode <#text>
BlockContainer <div> at (12,2516) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,2516 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,2516 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (12,2464) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,2464 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,2464 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,2620) content-size 780x0 children: inline
TextNode <#text>
Box <div.column.reverse.outer.flex-end> at (11,2621) content-size 60x300 flex-container(column-reverse) [FFC] children: not-inline
BlockContainer <div> at (12,2726) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 61.765625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [12,2726 61.765625x17]
frag 0 from TextNode start: 0, length: 8, rect: [12,2726 61.765625x17] baseline: 13.296875
"flex-end"
TextNode <#text>
BlockContainer <div> at (12,2674) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.34375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,2674 9.34375x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,2674 9.34375x17] baseline: 13.296875
"a"
TextNode <#text>
BlockContainer <div> at (12,2622) content-size 50x50 flex-item [BFC] children: inline
line 0 width: 9.46875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [12,2622 9.46875x17]
frag 0 from TextNode start: 0, length: 1, rect: [12,2622 9.46875x17] baseline: 13.296875
"b"
TextNode <#text>
BlockContainer <(anonymous)> at (10,2922) content-size 780x0 children: inline