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

@ -14,22 +14,19 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <th> at (11,11) content-size 70.046875x17 table-cell [BFC] children: inline
line 0 width: 70.046875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [11,11 70.046875x17]
frag 0 from TextNode start: 0, length: 8, rect: [11,11 70.046875x17] baseline: 13.296875
"Header 1"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <th> at (85.046875,11) content-size 72.515625x17 table-cell [BFC] children: inline
line 0 width: 72.515625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [85.046875,11 72.515625x17]
frag 0 from TextNode start: 0, length: 8, rect: [85.046875,11 72.515625x17] baseline: 13.296875
"Header 2"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <th> at (161.5625,11) content-size 72.796875x17 table-cell [BFC] children: inline
line 0 width: 72.796875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 8, rect: [161.5625,11 72.796875x17]
frag 0 from TextNode start: 0, length: 8, rect: [161.5625,11 72.796875x17] baseline: 13.296875
"Header 3"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -40,22 +37,19 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,32) content-size 70.046875x17 table-cell [BFC] children: inline
line 0 width: 41.84375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [25,32 41.84375x17]
frag 0 from TextNode start: 0, length: 6, rect: [25,32 41.84375x17] baseline: 13.296875
"Cell 1"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (85.046875,32) content-size 72.515625x17 table-cell [BFC] children: inline
line 0 width: 44.3125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [99.046875,32 44.3125x17]
frag 0 from TextNode start: 0, length: 6, rect: [99.046875,32 44.3125x17] baseline: 13.296875
"Cell 2"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (161.5625,42.5) content-size 72.796875x17 table-cell [BFC] children: inline
line 0 width: 44.59375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [175.5625,42.5 44.59375x17]
frag 0 from TextNode start: 0, length: 6, rect: [175.5625,42.5 44.59375x17] baseline: 13.296875
"Cell 3"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -66,15 +60,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,53) content-size 70.046875x17 table-cell [BFC] children: inline
line 0 width: 43.25, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [24,53 43.25x17]
frag 0 from TextNode start: 0, length: 6, rect: [24,53 43.25x17] baseline: 13.296875
"Cell 4"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (85.046875,53) content-size 72.515625x17 table-cell [BFC] children: inline
line 0 width: 43.953125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [99.046875,53 43.953125x17]
frag 0 from TextNode start: 0, length: 6, rect: [99.046875,53 43.953125x17] baseline: 13.296875
"Cell 5"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -85,22 +77,19 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,74) content-size 70.046875x17 table-cell [BFC] children: inline
line 0 width: 44.234375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [24,74 44.234375x17]
frag 0 from TextNode start: 0, length: 6, rect: [24,74 44.234375x17] baseline: 13.296875
"Cell 6"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (85.046875,74) content-size 72.515625x17 table-cell [BFC] children: inline
line 0 width: 44.21875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [99.046875,74 44.21875x17]
frag 0 from TextNode start: 0, length: 6, rect: [99.046875,74 44.21875x17] baseline: 13.296875
"Cell 7"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (161.5625,74) content-size 72.796875x17 table-cell [BFC] children: inline
line 0 width: 44.984375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [175.5625,74 44.984375x17]
frag 0 from TextNode start: 0, length: 6, rect: [175.5625,74 44.984375x17] baseline: 13.296875
"Cell 8"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -111,22 +100,19 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,95) content-size 70.046875x17 table-cell [BFC] children: inline
line 0 width: 44.328125, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 6, rect: [24,95 44.328125x17]
frag 0 from TextNode start: 0, length: 6, rect: [24,95 44.328125x17] baseline: 13.296875
"Cell 9"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (85.046875,95) content-size 72.515625x17 table-cell [BFC] children: inline
line 0 width: 51.4375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [96.046875,95 51.4375x17]
frag 0 from TextNode start: 0, length: 7, rect: [96.046875,95 51.4375x17] baseline: 13.296875
"Cell 10"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (161.5625,105.5) content-size 72.796875x17 table-cell [BFC] children: inline
line 0 width: 48.1875, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [173.5625,105.5 48.1875x17]
frag 0 from TextNode start: 0, length: 7, rect: [173.5625,105.5 48.1875x17] baseline: 13.296875
"Cell 11"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
@ -137,15 +123,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,116) content-size 70.046875x17 table-cell [BFC] children: inline
line 0 width: 50.65625, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [21,116 50.65625x17]
frag 0 from TextNode start: 0, length: 7, rect: [21,116 50.65625x17] baseline: 13.296875
"Cell 12"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (85.046875,116) content-size 72.515625x17 table-cell [BFC] children: inline
line 0 width: 50.9375, height: 17, bottom: 17, baseline: 13.296875
frag 0 from TextNode start: 0, length: 7, rect: [96.046875,116 50.9375x17]
frag 0 from TextNode start: 0, length: 7, rect: [96.046875,116 50.9375x17] baseline: 13.296875
"Cell 13"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline