1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 11:47:34 +00:00

LibWeb: Show formatting context roots in layout tree dumps

This patch does three things:

- Factors out the code that determines whether a box will create a new
  formatting context for its children (and which type of context)

- Uses that code to mark all formatting context roots in layout tree
  dumps. This makes it much easier to follow along with layout since
  you can now see exactly where control is transferred to a new
  formatting context.

- Rebaselines all existing layout tests, since the output format has
  changed slightly.
This commit is contained in:
Andreas Kling 2023-05-03 10:32:23 +02:00
parent 42e118e6a9
commit 968db96101
117 changed files with 905 additions and 851 deletions

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x700 children: not-inline
BlockContainer <html> at (0,0) content-size 800x700 [BFC] children: not-inline
BlockContainer <body> at (50,50) content-size 700x600 children: inline
line 0 width: 616, height: 203.46875, bottom: 203.46875, baseline: 200
frag 0 from SVGSVGBox start: 0, length: 0, rect: [50,150 200x100]
@ -19,7 +19,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
frag 4 from SVGSVGBox start: 0, length: 0, rect: [466,250 200x200]
line 2 width: 200, height: 200, bottom: 600, baseline: 200
frag 0 from SVGSVGBox start: 0, length: 0, rect: [50,450 200x200]
SVGSVGBox <svg> at (50,150) content-size 200x100 children: inline
SVGSVGBox <svg> at (50,150) content-size 200x100 [SVG] children: inline
TextNode <#text>
SVGGraphicsBox <g> children: inline
TextNode <#text>
@ -32,21 +32,21 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
SVGSVGBox <svg> at (258,50) content-size 200x200 children: inline
SVGSVGBox <svg> at (258,50) content-size 200x200 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <rect> at (268,60) content-size 30x20 children: not-inline
TextNode <#text>
SVGGeometryBox <rect> at (288,130) content-size 110x90 children: not-inline
TextNode <#text>
TextNode <#text>
SVGSVGBox <svg> at (466,50) content-size 200x200 children: inline
SVGSVGBox <svg> at (466,50) content-size 200x200 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <rect> at (506,90) content-size 120x120 children: not-inline
TextNode <#text>
SVGGeometryBox <rect> at (471.358978,90) content-size 189.282043x120 children: not-inline
TextNode <#text>
TextNode <#text>
SVGSVGBox <svg> at (50,250) content-size 200x200 children: inline
SVGSVGBox <svg> at (50,250) content-size 200x200 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <rect> at (120.588233,320.588256) content-size 58.823524x58.823532 children: not-inline
TextNode <#text>
@ -57,7 +57,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
SVGGeometryBox <rect> at (179.411773,321.481903) content-size 68.14447x68.14447 children: not-inline
TextNode <#text>
TextNode <#text>
SVGSVGBox <svg> at (258,250) content-size 200x200 children: inline
SVGSVGBox <svg> at (258,250) content-size 200x200 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <circle> at (278,270) content-size 160x160 children: not-inline
@ -72,14 +72,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
SVGGeometryBox <circle> at (338,330) content-size 40x40 children: not-inline
TextNode <#text>
TextNode <#text>
SVGSVGBox <svg> at (466,250) content-size 200x200 children: inline
SVGSVGBox <svg> at (466,250) content-size 200x200 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <rect> at (506,290) content-size 120x120 children: not-inline
TextNode <#text>
SVGGeometryBox <rect> at (506,255.358978) content-size 120x189.282043 children: not-inline
TextNode <#text>
TextNode <#text>
SVGSVGBox <svg> at (50,450) content-size 200x200 children: inline
SVGSVGBox <svg> at (50,450) content-size 200x200 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (60,460) content-size 80x80 children: not-inline