1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:47:46 +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,181 +5,125 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.grid-item.item-span-one-one> at (108.640625,8) content-size 101.515625x238 [BFC] children: inline
line 0 width: 31.546875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 4, rect: [108.640625,8 31.546875x17]
frag 0 from TextNode start: 1, length: 4, rect: [108.640625,8 31.546875x17] baseline: 13.296875
"In a"
line 1 width: 84.84375, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 6, length: 12, rect: [108.640625,25 84.84375x17]
frag 1 from TextNode start: 6, length: 12, rect: [108.640625,25 84.84375x17] baseline: 13.296875
"sollicitudin"
line 2 width: 86.046875, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 19, length: 10, rect: [108.640625,42 86.046875x17]
frag 2 from TextNode start: 19, length: 10, rect: [108.640625,42 86.046875x17] baseline: 13.296875
"augue. Sed"
line 3 width: 92.734375, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 30, length: 11, rect: [108.640625,59 92.734375x17]
frag 3 from TextNode start: 30, length: 11, rect: [108.640625,59 92.734375x17] baseline: 13.296875
"ante augue,"
line 4 width: 101.3125, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 42, length: 11, rect: [108.640625,76 101.3125x17]
frag 4 from TextNode start: 42, length: 11, rect: [108.640625,76 101.3125x17] baseline: 13.296875
"rhoncus nec"
line 5 width: 98.40625, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 54, length: 13, rect: [108.640625,93 98.40625x17]
frag 5 from TextNode start: 54, length: 13, rect: [108.640625,93 98.40625x17] baseline: 13.296875
"porttitor id,"
line 6 width: 74.125, height: 17, bottom: 119, baseline: 13.296875
frag 0 from TextNode start: 68, length: 10, rect: [108.640625,110 74.125x17]
frag 6 from TextNode start: 68, length: 10, rect: [108.640625,110 74.125x17] baseline: 13.296875
"lacinia et"
line 7 width: 37.28125, height: 17, bottom: 136, baseline: 13.296875
frag 0 from TextNode start: 79, length: 5, rect: [108.640625,127 37.28125x17]
frag 7 from TextNode start: 79, length: 5, rect: [108.640625,127 37.28125x17] baseline: 13.296875
"nibh."
line 8 width: 101.515625, height: 17, bottom: 153, baseline: 13.296875
frag 0 from TextNode start: 85, length: 12, rect: [108.640625,144 101.515625x17]
frag 8 from TextNode start: 85, length: 12, rect: [108.640625,144 101.515625x17] baseline: 13.296875
"Pellentesque"
line 9 width: 93.1875, height: 17, bottom: 170, baseline: 13.296875
frag 0 from TextNode start: 98, length: 12, rect: [108.640625,161 93.1875x17]
frag 9 from TextNode start: 98, length: 12, rect: [108.640625,161 93.1875x17] baseline: 13.296875
"diam libero,"
line 10 width: 101.0625, height: 17, bottom: 187, baseline: 13.296875
frag 0 from TextNode start: 111, length: 13, rect: [108.640625,178 101.0625x17]
frag 10 from TextNode start: 111, length: 13, rect: [108.640625,178 101.0625x17] baseline: 13.296875
"ultrices eget"
line 11 width: 88.109375, height: 17, bottom: 204, baseline: 13.296875
frag 0 from TextNode start: 125, length: 12, rect: [108.640625,195 88.109375x17]
frag 11 from TextNode start: 125, length: 12, rect: [108.640625,195 88.109375x17] baseline: 13.296875
"eleifend at,"
line 12 width: 83.953125, height: 17, bottom: 221, baseline: 13.296875
frag 0 from TextNode start: 138, length: 9, rect: [108.640625,212 83.953125x17]
frag 12 from TextNode start: 138, length: 9, rect: [108.640625,212 83.953125x17] baseline: 13.296875
"consequat"
line 13 width: 61.609375, height: 17, bottom: 238, baseline: 13.296875
frag 0 from TextNode start: 148, length: 8, rect: [108.640625,229 61.609375x17]
frag 13 from TextNode start: 148, length: 8, rect: [108.640625,229 61.609375x17] baseline: 13.296875
"ut orci."
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.grid-item.item-span-one-two> at (108.640625,246) content-size 101.515625x306 [BFC] children: inline
line 0 width: 98.65625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 11, rect: [108.640625,246 98.65625x17]
frag 0 from TextNode start: 1, length: 11, rect: [108.640625,246 98.65625x17] baseline: 13.296875
"Suspendisse"
line 1 width: 60.734375, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 13, length: 8, rect: [108.640625,263 60.734375x17]
frag 1 from TextNode start: 13, length: 8, rect: [108.640625,263 60.734375x17] baseline: 13.296875
"potenti."
line 2 width: 101.515625, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 22, length: 12, rect: [108.640625,280 101.515625x17]
frag 2 from TextNode start: 22, length: 12, rect: [108.640625,280 101.515625x17] baseline: 13.296875
"Pellentesque"
line 3 width: 74.25, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 35, length: 9, rect: [108.640625,297 74.25x17]
frag 3 from TextNode start: 35, length: 9, rect: [108.640625,297 74.25x17] baseline: 13.296875
"at varius"
line 4 width: 80.546875, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 45, length: 10, rect: [108.640625,314 80.546875x17]
frag 4 from TextNode start: 45, length: 10, rect: [108.640625,314 80.546875x17] baseline: 13.296875
"lacus, sed"
line 5 width: 84.84375, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 56, length: 12, rect: [108.640625,331 84.84375x17]
frag 5 from TextNode start: 56, length: 12, rect: [108.640625,331 84.84375x17] baseline: 13.296875
"sollicitudin"
line 6 width: 27.65625, height: 17, bottom: 119, baseline: 13.296875
frag 0 from TextNode start: 69, length: 4, rect: [108.640625,348 27.65625x17]
frag 6 from TextNode start: 69, length: 4, rect: [108.640625,348 27.65625x17] baseline: 13.296875
"leo."
line 7 width: 101.515625, height: 17, bottom: 136, baseline: 13.296875
frag 0 from TextNode start: 74, length: 12, rect: [108.640625,365 101.515625x17]
frag 7 from TextNode start: 74, length: 12, rect: [108.640625,365 101.515625x17] baseline: 13.296875
"Pellentesque"
line 8 width: 80.15625, height: 17, bottom: 153, baseline: 13.296875
frag 0 from TextNode start: 87, length: 9, rect: [108.640625,382 80.15625x17]
frag 8 from TextNode start: 87, length: 9, rect: [108.640625,382 80.15625x17] baseline: 13.296875
"malesuada"
line 9 width: 56.625, height: 17, bottom: 170, baseline: 13.296875
frag 0 from TextNode start: 97, length: 7, rect: [108.640625,399 56.625x17]
frag 9 from TextNode start: 97, length: 7, rect: [108.640625,399 56.625x17] baseline: 13.296875
"mi eget"
line 10 width: 99.40625, height: 17, bottom: 187, baseline: 13.296875
frag 0 from TextNode start: 105, length: 12, rect: [108.640625,416 99.40625x17]
frag 10 from TextNode start: 105, length: 12, rect: [108.640625,416 99.40625x17] baseline: 13.296875
"pellentesque"
line 11 width: 60.734375, height: 17, bottom: 204, baseline: 13.296875
frag 0 from TextNode start: 118, length: 7, rect: [108.640625,433 60.734375x17]
frag 11 from TextNode start: 118, length: 7, rect: [108.640625,433 60.734375x17] baseline: 13.296875
"tempor."
line 12 width: 48.71875, height: 17, bottom: 221, baseline: 13.296875
frag 0 from TextNode start: 126, length: 5, rect: [108.640625,450 48.71875x17]
frag 12 from TextNode start: 126, length: 5, rect: [108.640625,450 48.71875x17] baseline: 13.296875
"Donec"
line 13 width: 59.890625, height: 17, bottom: 238, baseline: 13.296875
frag 0 from TextNode start: 132, length: 7, rect: [108.640625,467 59.890625x17]
frag 13 from TextNode start: 132, length: 7, rect: [108.640625,467 59.890625x17] baseline: 13.296875
"egestas"
line 14 width: 92.015625, height: 17, bottom: 255, baseline: 13.296875
frag 0 from TextNode start: 140, length: 11, rect: [108.640625,484 92.015625x17]
frag 14 from TextNode start: 140, length: 11, rect: [108.640625,484 92.015625x17] baseline: 13.296875
"mauris est,"
line 15 width: 88.640625, height: 17, bottom: 272, baseline: 13.296875
frag 0 from TextNode start: 152, length: 11, rect: [108.640625,501 88.640625x17]
frag 15 from TextNode start: 152, length: 11, rect: [108.640625,501 88.640625x17] baseline: 13.296875
"ut lobortis"
line 16 width: 84.9375, height: 17, bottom: 289, baseline: 13.296875
frag 0 from TextNode start: 164, length: 11, rect: [108.640625,518 84.9375x17]
frag 16 from TextNode start: 164, length: 11, rect: [108.640625,518 84.9375x17] baseline: 13.296875
"nisi luctus"
line 17 width: 20.546875, height: 17, bottom: 306, baseline: 13.296875
frag 0 from TextNode start: 176, length: 3, rect: [108.640625,535 20.546875x17]
frag 17 from TextNode start: 176, length: 3, rect: [108.640625,535 20.546875x17] baseline: 13.296875
"at."
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.grid-item.item-span-two> at (8,8) content-size 100.640625x544 [BFC] children: inline
line 0 width: 50.96875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 5, rect: [8,8 50.96875x17]
frag 0 from TextNode start: 1, length: 5, rect: [8,8 50.96875x17] baseline: 13.296875
"Lorem"
line 1 width: 94.9375, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 7, length: 11, rect: [8,25 94.9375x17]
frag 1 from TextNode start: 7, length: 11, rect: [8,25 94.9375x17] baseline: 13.296875
"ipsum dolor"
line 2 width: 70.9375, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 19, length: 9, rect: [8,42 70.9375x17]
frag 2 from TextNode start: 19, length: 9, rect: [8,42 70.9375x17] baseline: 13.296875
"sit amet,"
line 3 width: 96.84375, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 29, length: 11, rect: [8,59 96.84375x17]
frag 3 from TextNode start: 29, length: 11, rect: [8,59 96.84375x17] baseline: 13.296875
"consectetur"
line 4 width: 75.71875, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 41, length: 10, rect: [8,76 75.71875x17]
frag 4 from TextNode start: 41, length: 10, rect: [8,76 75.71875x17] baseline: 13.296875
"adipiscing"
line 5 width: 65.265625, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 52, length: 9, rect: [8,93 65.265625x17]
frag 5 from TextNode start: 52, length: 9, rect: [8,93 65.265625x17] baseline: 13.296875
"elit. Sed"
line 6 width: 37.6875, height: 17, bottom: 119, baseline: 13.296875
frag 0 from TextNode start: 62, length: 5, rect: [8,110 37.6875x17]
frag 6 from TextNode start: 62, length: 5, rect: [8,110 37.6875x17] baseline: 13.296875
"vitae"
line 7 width: 100.640625, height: 17, bottom: 136, baseline: 13.296875
frag 0 from TextNode start: 68, length: 11, rect: [8,127 100.640625x17]
frag 7 from TextNode start: 68, length: 11, rect: [8,127 100.640625x17] baseline: 13.296875
"condimentum"
line 8 width: 65.03125, height: 17, bottom: 153, baseline: 13.296875
frag 0 from TextNode start: 80, length: 8, rect: [8,144 65.03125x17]
frag 8 from TextNode start: 80, length: 8, rect: [8,144 65.03125x17] baseline: 13.296875
"erat, ac"
line 9 width: 65.15625, height: 17, bottom: 170, baseline: 13.296875
frag 0 from TextNode start: 89, length: 7, rect: [8,161 65.15625x17]
frag 9 from TextNode start: 89, length: 7, rect: [8,161 65.15625x17] baseline: 13.296875
"posuere"
line 10 width: 41.171875, height: 17, bottom: 187, baseline: 13.296875
frag 0 from TextNode start: 97, length: 5, rect: [8,178 41.171875x17]
frag 10 from TextNode start: 97, length: 5, rect: [8,178 41.171875x17] baseline: 13.296875
"arcu."
line 11 width: 60.265625, height: 17, bottom: 204, baseline: 13.296875
frag 0 from TextNode start: 103, length: 6, rect: [8,195 60.265625x17]
frag 11 from TextNode start: 103, length: 6, rect: [8,195 60.265625x17] baseline: 13.296875
"Aenean"
line 12 width: 93.34375, height: 17, bottom: 221, baseline: 13.296875
frag 0 from TextNode start: 110, length: 12, rect: [8,212 93.34375x17]
frag 12 from TextNode start: 110, length: 12, rect: [8,212 93.34375x17] baseline: 13.296875
"tincidunt mi"
line 13 width: 73.90625, height: 17, bottom: 238, baseline: 13.296875
frag 0 from TextNode start: 123, length: 11, rect: [8,229 73.90625x17]
frag 13 from TextNode start: 123, length: 11, rect: [8,229 73.90625x17] baseline: 13.296875
"ligula, vel"
line 14 width: 57.234375, height: 17, bottom: 255, baseline: 13.296875
frag 0 from TextNode start: 135, length: 6, rect: [8,246 57.234375x17]
frag 14 from TextNode start: 135, length: 6, rect: [8,246 57.234375x17] baseline: 13.296875
"semper"
line 15 width: 41.640625, height: 17, bottom: 272, baseline: 13.296875
frag 0 from TextNode start: 142, length: 5, rect: [8,263 41.640625x17]
frag 15 from TextNode start: 142, length: 5, rect: [8,263 41.640625x17] baseline: 13.296875
"dolor"
line 16 width: 83.09375, height: 17, bottom: 289, baseline: 13.296875
frag 0 from TextNode start: 148, length: 11, rect: [8,280 83.09375x17]
frag 16 from TextNode start: 148, length: 11, rect: [8,280 83.09375x17] baseline: 13.296875
"aliquet at."
line 17 width: 75.8125, height: 17, bottom: 306, baseline: 13.296875
frag 0 from TextNode start: 160, length: 9, rect: [8,297 75.8125x17]
frag 17 from TextNode start: 160, length: 9, rect: [8,297 75.8125x17] baseline: 13.296875
"Phasellus"
line 18 width: 92.1875, height: 17, bottom: 323, baseline: 13.296875
frag 0 from TextNode start: 170, length: 11, rect: [8,314 92.1875x17]
frag 18 from TextNode start: 170, length: 11, rect: [8,314 92.1875x17] baseline: 13.296875
"scelerisque"
line 19 width: 59.765625, height: 17, bottom: 340, baseline: 13.296875
frag 0 from TextNode start: 182, length: 7, rect: [8,331 59.765625x17]
frag 19 from TextNode start: 182, length: 7, rect: [8,331 59.765625x17] baseline: 13.296875
"dapibus"
line 20 width: 67.890625, height: 17, bottom: 357, baseline: 13.296875
frag 0 from TextNode start: 190, length: 8, rect: [8,348 67.890625x17]
frag 20 from TextNode start: 190, length: 8, rect: [8,348 67.890625x17] baseline: 13.296875
"diam sed"
line 21 width: 70.4375, height: 17, bottom: 374, baseline: 13.296875
frag 0 from TextNode start: 199, length: 8, rect: [8,365 70.4375x17]
frag 21 from TextNode start: 199, length: 8, rect: [8,365 70.4375x17] baseline: 13.296875
"rhoncus."
line 22 width: 78.8125, height: 17, bottom: 391, baseline: 13.296875
frag 0 from TextNode start: 208, length: 9, rect: [8,382 78.8125x17]
frag 22 from TextNode start: 208, length: 9, rect: [8,382 78.8125x17] baseline: 13.296875
"Proin sed"
line 23 width: 68.296875, height: 17, bottom: 408, baseline: 13.296875
frag 0 from TextNode start: 218, length: 9, rect: [8,399 68.296875x17]
frag 23 from TextNode start: 218, length: 9, rect: [8,399 68.296875x17] baseline: 13.296875
"orci leo."
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline