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

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 0x17 children: inline
line 0 width: 0, height: 17, bottom: 17, baseline: 13.296875
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,21 0x0]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,21 0x0] baseline: 0
SVGSVGBox <svg> at (8,21) content-size 0x0 [SVG] children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600]

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x216 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x200 children: inline
line 0 width: 200, height: 200, bottom: 200, baseline: 200
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200
SVGSVGBox <svg> at (8,8) content-size 200x200 [SVG] children: inline
TextNode <#text>
SVGGraphicsBox <mask#myMask> at (8,8) content-size 1x1 children: inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x800 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x784 children: inline
line 0 width: 784, height: 784, bottom: 784, baseline: 784
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784
SVGSVGBox <svg> at (8,8) content-size 784x784 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <circle> at (47.203125,47.203125) content-size 548.796875x548.796875 children: not-inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x800 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x784 children: inline
line 0 width: 784, height: 784, bottom: 784, baseline: 784
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784
SVGSVGBox <svg> at (8,8) content-size 784x784 [SVG] children: not-inline
SVGGeometryBox <rect> at (8,8) content-size 784x784 children: not-inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x800 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x784 children: inline
line 0 width: 784, height: 784, bottom: 784, baseline: 784
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] baseline: 784
SVGSVGBox <svg> at (8,8) content-size 784x784 [SVG] children: inline
TextNode <#text>
SVGGraphicsBox <g> at (121.671875,121.671875) content-size 556.65625x556.65625 children: inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x40 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x24 children: inline
line 0 width: 24, height: 24, bottom: 24, baseline: 24
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 24x24]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 24x24] baseline: 24
SVGSVGBox <svg> at (8,8) content-size 24x24 [SVG] children: inline
SVGGraphicsBox <g> at (8,8) content-size 24x24 children: inline
SVGSVGBox <svg> at (8,8) content-size 24x24 [SVG] children: not-inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: inline
line 0 width: 100, height: 100, bottom: 100, baseline: 100
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100
SVGSVGBox <svg> at (8,8) content-size 100x100 [SVG] children: not-inline
SVGGeometryBox <path> at (8,10) content-size 100x48 children: not-inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: inline
line 0 width: 100, height: 100, bottom: 100, baseline: 100
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100
SVGSVGBox <svg> at (8,8) content-size 100x100 [SVG] children: not-inline
SVGGeometryBox <path> at (28,28) content-size 60x60 children: not-inline

View file

@ -5,8 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
TextNode <#text>
BlockContainer <div> at (8,8) content-size 784x150 children: inline
line 0 width: 300, height: 150, bottom: 150, baseline: 150
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150
TextNode <#text>
SVGSVGBox <svg> at (8,8) content-size 300x150 [SVG] children: inline
TextNode <#text>

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x118 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x102 children: inline
line 0 width: 102, height: 102, bottom: 102, baseline: 102
frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 100x100]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 100x100] baseline: 102
SVGSVGBox <svg> at (9,9) content-size 100x100 [SVG] children: not-inline
SVGGeometryBox <rect> at (29,29) content-size 60x60 children: not-inline

View file

@ -1,11 +1,10 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17 children: inline
line 0 width: 8, height: 17, bottom: 17, baseline: 13.296875
frag 0 from ImageBox start: 0, length: 0, rect: [8,21 0x0]
frag 1 from TextNode start: 0, length: 1, rect: [8,8 8x17]
frag 0 from ImageBox start: 0, length: 0, rect: [8,21 0x0] baseline: 0
frag 1 from TextNode start: 0, length: 1, rect: [8,8 8x17] baseline: 13.296875
" "
frag 2 from SVGSVGBox start: 0, length: 0, rect: [16,21 0x0]
frag 2 from SVGSVGBox start: 0, length: 0, rect: [16,21 0x0] baseline: 0
ImageBox <img> at (8,21) content-size 0x0 children: not-inline
(SVG-as-image isolated context)
Viewport <#document> at (0,0) content-size 0x0 [BFC] children: inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: inline
line 0 width: 100, height: 100, bottom: 100, baseline: 100
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100
SVGSVGBox <svg> at (8,8) content-size 100x100 [SVG] children: inline
TextNode <#text>
SVGTextBox <text> (not painted) children: inline

View file

@ -1,8 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x150 children: inline
line 0 width: 300, height: 150, bottom: 150, baseline: 150
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150]
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150
SVGSVGBox <svg> at (8,8) content-size 300x150 [SVG] children: not-inline
SVGTextBox <text> at (8,8) content-size 0x0 children: not-inline
TextNode <#text>