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

@ -8,8 +8,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <dl> at (25,25) content-size 470x0 children: inline
TextNode <#text>
BlockContainer <dt> at (40,40) content-size 49.984375x280 floating [BFC] children: inline
line 0 width: 28.3125, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 6, rect: [40,40 28.3125x10]
frag 0 from TextNode start: 0, length: 6, rect: [40,40 28.3125x10] baseline: 8
"toggle"
TextNode <#text>
TextNode <#text>
@ -19,8 +18,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <ul> at (135,45) content-size 340x0 children: inline
TextNode <#text>
BlockContainer <li> at (150,60) content-size 50x90 floating [BFC] children: inline
line 0 width: 37.875, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 7, rect: [150,60 37.875x10]
frag 0 from TextNode start: 0, length: 7, rect: [150,60 37.875x10] baseline: 8
"the way"
TextNode <#text>
TextNode <#text>
@ -28,8 +26,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> at (235,55) content-size 139.96875x0 children: inline
TextNode <#text>
BlockContainer <p> at (235,55) content-size 139.96875x10 children: inline
line 0 width: 74.3125, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 14, rect: [235,55 74.3125x10]
frag 0 from TextNode start: 0, length: 14, rect: [235,55 74.3125x10] baseline: 8
"the world ends"
TextNode <#text>
BlockContainer <(anonymous)> at (235,65) content-size 139.96875x0 children: inline
@ -39,18 +36,16 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
TextNode <#text>
BlockContainer <p> at (235,65) content-size 139.96875x19 children: inline
line 0 width: 39.484375, height: 19, bottom: 19, baseline: 12.5
frag 0 from TextNode start: 1, length: 5, rect: [235,65 27.484375x19]
frag 0 from TextNode start: 1, length: 5, rect: [235,65 27.484375x19] baseline: 12.5
"bang "
frag 1 from RadioButton start: 0, length: 0, rect: [262,65 12x12]
frag 1 from RadioButton start: 0, length: 0, rect: [262,65 12x12] baseline: 12
TextNode <#text>
RadioButton <input> at (262,65) content-size 12x12 inline-block children: not-inline
TextNode <#text>
BlockContainer <p> at (235,84) content-size 139.96875x19 children: inline
line 0 width: 57.15625, height: 19, bottom: 19, baseline: 12.5
frag 0 from TextNode start: 1, length: 8, rect: [235,84 45.15625x19]
frag 0 from TextNode start: 1, length: 8, rect: [235,84 45.15625x19] baseline: 12.5
"whimper "
frag 1 from RadioButton start: 0, length: 0, rect: [280,84 12x12]
frag 1 from RadioButton start: 0, length: 0, rect: [280,84 12x12] baseline: 12
TextNode <#text>
RadioButton <input> at (280,84) content-size 12x12 inline-block children: not-inline
TextNode <#text>
@ -58,17 +53,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
TextNode <#text>
BlockContainer <li> at (409.96875,60) content-size 50x90 floating [BFC] children: inline
line 0 width: 31.578125, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 6, rect: [409.96875,60 31.578125x10]
frag 0 from TextNode start: 0, length: 6, rect: [409.96875,60 31.578125x10] baseline: 8
"i grow"
line 1 width: 14.03125, height: 10, bottom: 20, baseline: 8
frag 0 from TextNode start: 7, length: 3, rect: [409.96875,70 14.03125x10]
frag 1 from TextNode start: 7, length: 3, rect: [409.96875,70 14.03125x10] baseline: 8
"old"
TextNode <#text>
TextNode <#text>
BlockContainer <li#baz> at (145,185) content-size 100x100 floating [BFC] children: inline
line 0 width: 29.421875, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 6, rect: [145,185 29.421875x10]
frag 0 from TextNode start: 0, length: 6, rect: [145,185 29.421875x10] baseline: 8
"pluot?"
TextNode <#text>
TextNode <#text>
@ -78,22 +70,18 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> at (280,195) content-size 50x0 children: inline
TextNode <#text>
BlockContainer <address> at (280,195) content-size 50x20 children: inline
line 0 width: 17.28125, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 3, rect: [280,195 17.28125x10]
frag 0 from TextNode start: 0, length: 3, rect: [280,195 17.28125x10] baseline: 8
"bar"
line 1 width: 30.21875, height: 10, bottom: 20, baseline: 8
frag 0 from TextNode start: 4, length: 6, rect: [280,205 30.21875x10]
frag 1 from TextNode start: 4, length: 6, rect: [280,205 30.21875x10] baseline: 8
"maids,"
TextNode <#text>
BlockContainer <(anonymous)> at (280,215) content-size 50x0 children: inline
TextNode <#text>
TextNode <#text>
BlockContainer <h1> at (365,185) content-size 100x100 floating [BFC] children: inline
line 0 width: 56.421875, height: 10, bottom: 10, baseline: 8
frag 0 from TextNode start: 0, length: 11, rect: [365,185 56.421875x10]
frag 0 from TextNode start: 0, length: 11, rect: [365,185 56.421875x10] baseline: 8
"sing to me,"
line 1 width: 65.4375, height: 10, bottom: 20, baseline: 8
frag 0 from TextNode start: 12, length: 12, rect: [365,195 65.4375x10]
frag 1 from TextNode start: 12, length: 12, rect: [365,195 65.4375x10] baseline: 8
"erbarme dich"
TextNode <#text>
TextNode <#text>
@ -101,28 +89,23 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> at (20,30) content-size 480x0 children: inline
TextNode <#text>
BlockContainer <p> at (20,335) content-size 480x65 children: inline
line 0 width: 473.625, height: 13, bottom: 13, baseline: 9.5
frag 0 from TextNode start: 1, length: 90, rect: [20,335 473.625x13]
frag 0 from TextNode start: 1, length: 90, rect: [20,335 473.625x13] baseline: 9.5
"This is a nonsensical document, but syntactically valid HTML 4.0. All 100%-conformant CSS1"
line 1 width: 396.96875, height: 13, bottom: 26, baseline: 9.5
frag 0 from TextNode start: 92, length: 74, rect: [20,348 396.96875x13]
frag 1 from TextNode start: 92, length: 74, rect: [20,348 396.96875x13] baseline: 9.5
"agents should be able to render the document elements above this paragraph"
line 2 width: 470.578125, height: 13, bottom: 39, baseline: 9.5
frag 0 from TextNode start: 167, length: 43, rect: [20,361 207.890625x13]
frag 2 from TextNode start: 167, length: 43, rect: [20,361 207.890625x13] baseline: 9.5
"indistinguishably (to the pixel) from this "
frag 1 from TextNode start: 0, length: 20, rect: [228,361 103.015625x13]
frag 3 from TextNode start: 0, length: 20, rect: [228,361 103.015625x13] baseline: 9.5
"reference rendering,"
frag 2 from TextNode start: 0, length: 31, rect: [331,361 159.671875x13]
frag 4 from TextNode start: 0, length: 31, rect: [331,361 159.671875x13] baseline: 9.5
" (except font rasterization and"
line 3 width: 465.015625, height: 13, bottom: 52, baseline: 9.5
frag 0 from TextNode start: 32, length: 89, rect: [20,374 465.015625x13]
frag 5 from TextNode start: 32, length: 89, rect: [20,374 465.015625x13] baseline: 9.5
"form widgets). All discrepancies should be traceable to CSS1 implementation shortcomings."
line 4 width: 408.15625, height: 13, bottom: 65, baseline: 9.5
frag 0 from TextNode start: 122, length: 67, rect: [20,387 345.546875x13]
frag 6 from TextNode start: 122, length: 67, rect: [20,387 345.546875x13] baseline: 9.5
"Once you have finished evaluating this test, you can return to the "
frag 1 from TextNode start: 0, length: 11, rect: [366,387 59.890625x13]
frag 7 from TextNode start: 0, length: 11, rect: [366,387 59.890625x13] baseline: 9.5
"parent page"
frag 2 from TextNode start: 0, length: 1, rect: [425,387 2.71875x13]
frag 8 from TextNode start: 0, length: 1, rect: [425,387 2.71875x13] baseline: 9.5
"."
TextNode <#text>
InlineNode <a>