1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 17:47:45 +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,103 +5,73 @@ 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 (411.46875,8) content-size 382x126 [BFC] children: inline
line 0 width: 319.171875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 40, rect: [411.46875,8 319.171875x17]
frag 0 from TextNode start: 1, length: 40, rect: [411.46875,8 319.171875x17] baseline: 13.296875
"In a sollicitudin augue. Sed ante augue,"
line 1 width: 335.125, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 42, length: 42, rect: [411.46875,25 335.125x17]
frag 1 from TextNode start: 42, length: 42, rect: [411.46875,25 335.125x17] baseline: 13.296875
"rhoncus nec porttitor id, lacinia et nibh."
line 2 width: 378.625, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 85, length: 48, rect: [411.46875,42 378.625x17]
frag 2 from TextNode start: 85, length: 48, rect: [411.46875,42 378.625x17] baseline: 13.296875
"Pellentesque diam libero, ultrices eget eleifend"
line 3 width: 182.8125, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 134, length: 22, rect: [411.46875,59 182.8125x17]
frag 3 from TextNode start: 134, length: 22, rect: [411.46875,59 182.8125x17] baseline: 13.296875
"at, consequat ut orci."
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.grid-item.item-span-one-two> at (411.46875,154) content-size 382x177 [BFC] children: inline
line 0 width: 359.15625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 43, rect: [411.46875,154 359.15625x17]
frag 0 from TextNode start: 1, length: 43, rect: [411.46875,154 359.15625x17] baseline: 13.296875
"Suspendisse potenti. Pellentesque at varius"
line 1 width: 318.5625, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 45, length: 41, rect: [411.46875,171 318.5625x17]
frag 1 from TextNode start: 45, length: 41, rect: [411.46875,171 318.5625x17] baseline: 13.296875
"lacus, sed sollicitudin leo. Pellentesque"
line 2 width: 377.640625, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 87, length: 44, rect: [411.46875,188 377.640625x17]
frag 2 from TextNode start: 87, length: 44, rect: [411.46875,188 377.640625x17] baseline: 13.296875
"malesuada mi eget pellentesque tempor. Donec"
line 3 width: 378.03125, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 132, length: 47, rect: [411.46875,205 378.03125x17]
frag 3 from TextNode start: 132, length: 47, rect: [411.46875,205 378.03125x17] baseline: 13.296875
"egestas mauris est, ut lobortis nisi luctus at."
line 4 width: 345.953125, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 180, length: 41, rect: [411.46875,222 345.953125x17]
frag 4 from TextNode start: 180, length: 41, rect: [411.46875,222 345.953125x17] baseline: 13.296875
"Vivamus eleifend, lorem vulputate maximus"
line 5 width: 312.765625, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 222, length: 37, rect: [411.46875,239 312.765625x17]
frag 5 from TextNode start: 222, length: 37, rect: [411.46875,239 312.765625x17] baseline: 13.296875
"porta, nunc metus porttitor nibh, nec"
line 6 width: 242.921875, height: 17, bottom: 119, baseline: 13.296875
frag 0 from TextNode start: 260, length: 31, rect: [411.46875,256 242.921875x17]
frag 6 from TextNode start: 260, length: 31, rect: [411.46875,256 242.921875x17] baseline: 13.296875
"bibendum nulla lectus ut felis."
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text>
BlockContainer <div.grid-item.item-span-two> at (8,8) content-size 383.46875x323 [BFC] children: inline
line 0 width: 337.6875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 39, rect: [8,8 337.6875x17]
frag 0 from TextNode start: 1, length: 39, rect: [8,8 337.6875x17] baseline: 13.296875
"Lorem ipsum dolor sit amet, consectetur"
line 1 width: 376.34375, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 41, length: 47, rect: [8,25 376.34375x17]
frag 1 from TextNode start: 41, length: 47, rect: [8,25 376.34375x17] baseline: 13.296875
"adipiscing elit. Sed vitae condimentum erat, ac"
line 2 width: 365.84375, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 89, length: 45, rect: [8,42 365.84375x17]
frag 2 from TextNode start: 89, length: 45, rect: [8,42 365.84375x17] baseline: 13.296875
"posuere arcu. Aenean tincidunt mi ligula, vel"
line 3 width: 381.96875, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 135, length: 46, rect: [8,59 381.96875x17]
frag 3 from TextNode start: 135, length: 46, rect: [8,59 381.96875x17] baseline: 13.296875
"semper dolor aliquet at. Phasellus scelerisque"
line 4 width: 377.203125, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 182, length: 45, rect: [8,76 377.203125x17]
frag 4 from TextNode start: 182, length: 45, rect: [8,76 377.203125x17] baseline: 13.296875
"dapibus diam sed rhoncus. Proin sed orci leo."
line 5 width: 375.390625, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 228, length: 45, rect: [8,93 375.390625x17]
frag 5 from TextNode start: 228, length: 45, rect: [8,93 375.390625x17] baseline: 13.296875
"Praesent pellentesque mi eu nunc gravida, vel"
line 6 width: 271.078125, height: 17, bottom: 119, baseline: 13.296875
frag 0 from TextNode start: 274, length: 32, rect: [8,110 271.078125x17]
frag 6 from TextNode start: 274, length: 32, rect: [8,110 271.078125x17] baseline: 13.296875
"consectetur nulla malesuada. Sed"
line 7 width: 303.5625, height: 17, bottom: 136, baseline: 13.296875
frag 0 from TextNode start: 307, length: 40, rect: [8,127 303.5625x17]
frag 7 from TextNode start: 307, length: 40, rect: [8,127 303.5625x17] baseline: 13.296875
"pellentesque, elit sit amet sollicitudin"
line 8 width: 346.625, height: 17, bottom: 153, baseline: 13.296875
frag 0 from TextNode start: 348, length: 46, rect: [8,144 346.625x17]
frag 8 from TextNode start: 348, length: 46, rect: [8,144 346.625x17] baseline: 13.296875
"sollicitudin, lectus justo facilisis lacus, ac"
line 9 width: 350.234375, height: 17, bottom: 170, baseline: 13.296875
frag 0 from TextNode start: 395, length: 42, rect: [8,161 350.234375x17]
frag 9 from TextNode start: 395, length: 42, rect: [8,161 350.234375x17] baseline: 13.296875
"vehicula metus neque ac mi. In in augue et"
line 10 width: 361.0625, height: 17, bottom: 187, baseline: 13.296875
frag 0 from TextNode start: 438, length: 40, rect: [8,178 361.0625x17]
frag 10 from TextNode start: 438, length: 40, rect: [8,178 361.0625x17] baseline: 13.296875
"massa maximus venenatis auctor fermentum"
line 11 width: 371.734375, height: 17, bottom: 204, baseline: 13.296875
frag 0 from TextNode start: 479, length: 46, rect: [8,195 371.734375x17]
frag 11 from TextNode start: 479, length: 46, rect: [8,195 371.734375x17] baseline: 13.296875
"dui. Aliquam dictum finibus urna, quis lacinia"
line 12 width: 369.59375, height: 17, bottom: 221, baseline: 13.296875
frag 0 from TextNode start: 526, length: 42, rect: [8,212 369.59375x17]
frag 12 from TextNode start: 526, length: 42, rect: [8,212 369.59375x17] baseline: 13.296875
"massa laoreet a. Suspendisse elementum non"
line 13 width: 323.78125, height: 17, bottom: 238, baseline: 13.296875
frag 0 from TextNode start: 569, length: 39, rect: [8,229 323.78125x17]
frag 13 from TextNode start: 569, length: 39, rect: [8,229 323.78125x17] baseline: 13.296875
"lectus nec elementum. Quisque ultricies"
line 14 width: 337, height: 17, bottom: 255, baseline: 13.296875
frag 0 from TextNode start: 609, length: 40, rect: [8,246 337x17]
frag 14 from TextNode start: 609, length: 40, rect: [8,246 337x17] baseline: 13.296875
"suscipit porttitor. Sed non urna rutrum,"
line 15 width: 351.828125, height: 17, bottom: 272, baseline: 13.296875
frag 0 from TextNode start: 650, length: 46, rect: [8,263 351.828125x17]
frag 15 from TextNode start: 650, length: 46, rect: [8,263 351.828125x17] baseline: 13.296875
"mattis nulla at, feugiat erat. Duis orci elit,"
line 16 width: 361.328125, height: 17, bottom: 289, baseline: 13.296875
frag 0 from TextNode start: 697, length: 45, rect: [8,280 361.328125x17]
frag 16 from TextNode start: 697, length: 45, rect: [8,280 361.328125x17] baseline: 13.296875
"vehicula sed blandit eget, auctor in arcu. Ut"
line 17 width: 345.75, height: 17, bottom: 306, baseline: 13.296875
frag 0 from TextNode start: 743, length: 41, rect: [8,297 345.75x17]
frag 17 from TextNode start: 743, length: 41, rect: [8,297 345.75x17] baseline: 13.296875
"cursus magna sit amet nulla cursus, vitae"
line 18 width: 180.234375, height: 17, bottom: 323, baseline: 13.296875
frag 0 from TextNode start: 785, length: 22, rect: [8,314 180.234375x17]
frag 18 from TextNode start: 785, length: 22, rect: [8,314 180.234375x17] baseline: 13.296875
"gravida mauris dictum."
TextNode <#text>
BlockContainer <(anonymous)> (not painted) [BFC] children: inline