1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 04:17: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

@ -10,15 +10,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (13,13) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 82.015625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 9, rect: [13,13 82.015625x17]
frag 0 from TextNode start: 0, length: 9, rect: [13,13 82.015625x17] baseline: 13.296875
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (101.015625,13) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 76.28125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [101.015625,13 76.28125x17]
frag 0 from TextNode start: 0, length: 8, rect: [101.015625,13 76.28125x17] baseline: 13.296875
"Lastname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -29,15 +27,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (13,36) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 44.65625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [13,36 44.65625x17]
frag 0 from TextNode start: 0, length: 5, rect: [13,36 44.65625x17] baseline: 13.296875
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (101.015625,36) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [101.015625,36 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [101.015625,36 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -48,15 +44,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (13,59) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 35.125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 4, rect: [13,59 35.125x17]
frag 0 from TextNode start: 0, length: 4, rect: [13,59 35.125x17] baseline: 13.296875
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (101.015625,59) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [101.015625,59 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [101.015625,59 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -75,15 +69,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (9,82) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 82.015625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 9, rect: [9,82 82.015625x17]
frag 0 from TextNode start: 0, length: 9, rect: [9,82 82.015625x17] baseline: 13.296875
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (95.015625,82) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 76.28125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [95.015625,82 76.28125x17]
frag 0 from TextNode start: 0, length: 8, rect: [95.015625,82 76.28125x17] baseline: 13.296875
"Lastname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -94,15 +86,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (9,103) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 44.65625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [9,103 44.65625x17]
frag 0 from TextNode start: 0, length: 5, rect: [9,103 44.65625x17] baseline: 13.296875
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (95.015625,103) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [95.015625,103 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [95.015625,103 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -113,15 +103,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (9,124) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 35.125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 4, rect: [9,124 35.125x17]
frag 0 from TextNode start: 0, length: 4, rect: [9,124 35.125x17] baseline: 13.296875
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (95.015625,124) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [95.015625,124 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [95.015625,124 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -139,15 +127,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.border-black> at (8,142) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 82.015625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 9, rect: [8,142 82.015625x17]
frag 0 from TextNode start: 0, length: 9, rect: [8,142 82.015625x17] baseline: 13.296875
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.border-black> at (92.015625,142) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 76.28125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [92.015625,142 76.28125x17]
frag 0 from TextNode start: 0, length: 8, rect: [92.015625,142 76.28125x17] baseline: 13.296875
"Lastname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -158,15 +144,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.border-black> at (8,161) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 44.65625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [8,161 44.65625x17]
frag 0 from TextNode start: 0, length: 5, rect: [8,161 44.65625x17] baseline: 13.296875
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.border-black> at (92.015625,161) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [92.015625,161 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [92.015625,161 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -177,15 +161,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.border-black> at (8,180) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 35.125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 4, rect: [8,180 35.125x17]
frag 0 from TextNode start: 0, length: 4, rect: [8,180 35.125x17] baseline: 13.296875
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.border-black> at (92.015625,180) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [92.015625,180 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [92.015625,180 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -203,15 +185,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.thick-border-black> at (8,197) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 82.015625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 9, rect: [8,197 82.015625x17]
frag 0 from TextNode start: 0, length: 9, rect: [8,197 82.015625x17] baseline: 13.296875
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.thick-border-black> at (100.015625,197) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 76.28125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [100.015625,197 76.28125x17]
frag 0 from TextNode start: 0, length: 8, rect: [100.015625,197 76.28125x17] baseline: 13.296875
"Lastname"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -222,15 +202,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.thick-border-black> at (8,224) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 44.65625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 5, rect: [8,224 44.65625x17]
frag 0 from TextNode start: 0, length: 5, rect: [8,224 44.65625x17] baseline: 13.296875
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.thick-border-black> at (100.015625,224) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [100.015625,224 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [100.015625,224 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -241,15 +219,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.thick-border-black> at (8,251) content-size 82.015625x17 table-cell [BFC] children: inline
line 0 width: 35.125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 4, rect: [8,251 35.125x17]
frag 0 from TextNode start: 0, length: 4, rect: [8,251 35.125x17] baseline: 13.296875
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <div.table-cell.thick-border-black> at (100.015625,251) content-size 76.28125x17 table-cell [BFC] children: inline
line 0 width: 53.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [100.015625,251 53.671875x17]
frag 0 from TextNode start: 0, length: 7, rect: [100.015625,251 53.671875x17] baseline: 13.296875
"Griffin"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline