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

@ -6,14 +6,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <div> at (8,8) content-size 784x0 children: inline
TextNode <#text>
BlockContainer <div#lefty> at (8,8) content-size 100x100 floating [BFC] children: inline
line 0 width: 10.859375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [8,8 10.859375x17]
frag 0 from TextNode start: 0, length: 1, rect: [8,8 10.859375x17] baseline: 13.296875
"L"
TextNode <#text>
TextNode <#text>
BlockContainer <div#righty> at (742,8) content-size 50x50 floating [BFC] children: inline
line 0 width: 13.6875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 1, rect: [742,8 13.6875x17]
frag 0 from TextNode start: 0, length: 1, rect: [742,8 13.6875x17] baseline: 13.296875
"R"
TextNode <#text>
TextNode <#text>
@ -22,14 +20,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <div> at (8,8) content-size 784x0 children: inline
TextNode <#text>
BlockContainer <div#lefty2> at (108,8) content-size 80x80 floating [BFC] children: inline
line 0 width: 19.671875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 2, rect: [108,8 19.671875x17]
frag 0 from TextNode start: 0, length: 2, rect: [108,8 19.671875x17] baseline: 13.296875
"L2"
TextNode <#text>
TextNode <#text>
BlockContainer <div#righty2> at (712,8) content-size 30x30 floating [BFC] children: inline
line 0 width: 22.5, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 2, rect: [712,8 22.5x17]
frag 0 from TextNode start: 0, length: 2, rect: [712,8 22.5x17] baseline: 13.296875
"R2"
TextNode <#text>
TextNode <#text>
@ -38,76 +34,55 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <div> at (8,8) content-size 784x0 children: inline
TextNode <#text>
BlockContainer <div#lefty3> at (188,8) content-size 40x40 floating [BFC] children: inline
line 0 width: 19.953125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 2, rect: [188,8 19.953125x17]
frag 0 from TextNode start: 0, length: 2, rect: [188,8 19.953125x17] baseline: 13.296875
"L3"
TextNode <#text>
TextNode <#text>
BlockContainer <div#righty3> at (692,8) content-size 20x20 floating [BFC] children: inline
line 0 width: 22.78125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 2, rect: [692,8 22.78125x17]
frag 0 from TextNode start: 0, length: 2, rect: [692,8 22.78125x17] baseline: 13.296875
"R3"
TextNode <#text>
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
TextNode <#text>
BlockContainer <div> at (8,8) content-size 784x323 children: inline
line 0 width: 414.5625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 1, length: 47, rect: [228,8 414.5625x17]
frag 0 from TextNode start: 1, length: 47, rect: [228,8 414.5625x17] baseline: 13.296875
"lorem ipsum lorem ipsum lorem ipsum lorem ipsum"
line 1 width: 414.5625, height: 17, bottom: 34, baseline: 13.296875
frag 0 from TextNode start: 49, length: 47, rect: [228,25 414.5625x17]
frag 1 from TextNode start: 49, length: 47, rect: [228,25 414.5625x17] baseline: 13.296875
"lorem ipsum lorem ipsum lorem ipsum lorem ipsum"
line 2 width: 466.90625, height: 17, bottom: 51, baseline: 13.296875
frag 0 from TextNode start: 97, length: 53, rect: [228,42 466.90625x17]
frag 2 from TextNode start: 97, length: 53, rect: [228,42 466.90625x17] baseline: 13.296875
"lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 3 width: 573.5, height: 17, bottom: 68, baseline: 13.296875
frag 0 from TextNode start: 151, length: 65, rect: [188,59 573.5x17]
frag 3 from TextNode start: 151, length: 65, rect: [188,59 573.5x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum"
line 4 width: 572.546875, height: 17, bottom: 85, baseline: 13.296875
frag 0 from TextNode start: 217, length: 65, rect: [188,76 572.546875x17]
frag 4 from TextNode start: 217, length: 65, rect: [188,76 572.546875x17] baseline: 13.296875
"lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 5 width: 679.140625, height: 17, bottom: 102, baseline: 13.296875
frag 0 from TextNode start: 283, length: 77, rect: [108,93 679.140625x17]
frag 5 from TextNode start: 283, length: 77, rect: [108,93 679.140625x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum"
line 6 width: 783.828125, height: 17, bottom: 119, baseline: 13.296875
frag 0 from TextNode start: 361, length: 89, rect: [8,110 783.828125x17]
frag 6 from TextNode start: 361, length: 89, rect: [8,110 783.828125x17] baseline: 13.296875
"lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 7 width: 731.484375, height: 17, bottom: 136, baseline: 13.296875
frag 0 from TextNode start: 451, length: 83, rect: [8,127 731.484375x17]
frag 7 from TextNode start: 451, length: 83, rect: [8,127 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 8 width: 731.484375, height: 17, bottom: 153, baseline: 13.296875
frag 0 from TextNode start: 535, length: 83, rect: [8,144 731.484375x17]
frag 8 from TextNode start: 535, length: 83, rect: [8,144 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 9 width: 731.484375, height: 17, bottom: 170, baseline: 13.296875
frag 0 from TextNode start: 619, length: 83, rect: [8,161 731.484375x17]
frag 9 from TextNode start: 619, length: 83, rect: [8,161 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 10 width: 731.484375, height: 17, bottom: 187, baseline: 13.296875
frag 0 from TextNode start: 703, length: 83, rect: [8,178 731.484375x17]
frag 10 from TextNode start: 703, length: 83, rect: [8,178 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 11 width: 731.484375, height: 17, bottom: 204, baseline: 13.296875
frag 0 from TextNode start: 787, length: 83, rect: [8,195 731.484375x17]
frag 11 from TextNode start: 787, length: 83, rect: [8,195 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 12 width: 731.484375, height: 17, bottom: 221, baseline: 13.296875
frag 0 from TextNode start: 871, length: 83, rect: [8,212 731.484375x17]
frag 12 from TextNode start: 871, length: 83, rect: [8,212 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 13 width: 731.484375, height: 17, bottom: 238, baseline: 13.296875
frag 0 from TextNode start: 955, length: 83, rect: [8,229 731.484375x17]
frag 13 from TextNode start: 955, length: 83, rect: [8,229 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 14 width: 731.484375, height: 17, bottom: 255, baseline: 13.296875
frag 0 from TextNode start: 1039, length: 83, rect: [8,246 731.484375x17]
frag 14 from TextNode start: 1039, length: 83, rect: [8,246 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 15 width: 731.484375, height: 17, bottom: 272, baseline: 13.296875
frag 0 from TextNode start: 1123, length: 83, rect: [8,263 731.484375x17]
frag 15 from TextNode start: 1123, length: 83, rect: [8,263 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 16 width: 731.484375, height: 17, bottom: 289, baseline: 13.296875
frag 0 from TextNode start: 1207, length: 83, rect: [8,280 731.484375x17]
frag 16 from TextNode start: 1207, length: 83, rect: [8,280 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 17 width: 731.484375, height: 17, bottom: 306, baseline: 13.296875
frag 0 from TextNode start: 1291, length: 83, rect: [8,297 731.484375x17]
frag 17 from TextNode start: 1291, length: 83, rect: [8,297 731.484375x17] baseline: 13.296875
"ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem"
line 18 width: 45.296875, height: 17, bottom: 323, baseline: 13.296875
frag 0 from TextNode start: 1375, length: 5, rect: [8,314 45.296875x17]
frag 18 from TextNode start: 1375, length: 5, rect: [8,314 45.296875x17] baseline: 13.296875
"ipsum"
TextNode <#text>
BlockContainer <(anonymous)> at (8,331) content-size 784x0 children: inline