1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 01:57:44 +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 800x420 children: not-inline
BlockContainer <html> at (0,0) content-size 800x420 [BFC] children: not-inline
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
TextNode <#text>
BlockContainer <body> at (20,20) content-size 480x380 children: not-inline
@ -7,24 +7,24 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <dl> at (25,25) content-size 470x0 children: inline
TextNode <#text>
BlockContainer <dt> at (40,40) content-size 49.998596x280 floating children: inline
BlockContainer <dt> at (40,40) content-size 49.998596x280 floating [BFC] children: inline
line 0 width: 28.310546, height: 10, bottom: 10, baseline: 7.998046
frag 0 from TextNode start: 0, length: 6, rect: [40,40 28.310546x10]
"toggle"
TextNode <#text>
TextNode <#text>
BlockContainer <dd> at (135,45) content-size 340x270 floating children: not-inline
BlockContainer <dd> at (135,45) content-size 340x270 floating [BFC] children: not-inline
BlockContainer <(anonymous)> at (135,45) content-size 340x0 children: inline
TextNode <#text>
BlockContainer <ul> at (135,45) content-size 340x0 children: inline
TextNode <#text>
BlockContainer <li> at (150,60) content-size 50x90 floating children: inline
BlockContainer <li> at (150,60) content-size 50x90 floating [BFC] children: inline
line 0 width: 37.880859, height: 10, bottom: 10, baseline: 7.998046
frag 0 from TextNode start: 0, length: 7, rect: [150,60 37.880859x10]
"the way"
TextNode <#text>
TextNode <#text>
BlockContainer <li#bar> at (235,55) content-size 139.977996x90 floating children: not-inline
BlockContainer <li#bar> at (235,55) content-size 139.977996x90 floating [BFC] children: not-inline
BlockContainer <(anonymous)> at (235,55) content-size 139.977996x0 children: inline
TextNode <#text>
BlockContainer <p> at (235,55) content-size 139.977996x10 children: inline
@ -57,7 +57,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> at (235,103) content-size 139.977996x0 children: inline
TextNode <#text>
TextNode <#text>
BlockContainer <li> at (409.977996,60) content-size 50x90 floating children: inline
BlockContainer <li> at (409.977996,60) content-size 50x90 floating [BFC] children: inline
line 0 width: 31.582031, height: 10, bottom: 10, baseline: 7.998046
frag 0 from TextNode start: 0, length: 6, rect: [409.977996,60 31.582031x10]
"i grow"
@ -66,7 +66,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
"old"
TextNode <#text>
TextNode <#text>
BlockContainer <li#baz> at (145,185) content-size 100x100 floating children: inline
BlockContainer <li#baz> at (145,185) content-size 100x100 floating [BFC] children: inline
line 0 width: 29.423828, height: 10, bottom: 10, baseline: 7.998046
frag 0 from TextNode start: 0, length: 6, rect: [145,185 29.423828x10]
"pluot?"
@ -74,7 +74,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> at (135,45) content-size 340x0 children: inline
TextNode <#text>
BlockContainer <blockquote> at (280,195) content-size 50x90 floating children: not-inline
BlockContainer <blockquote> at (280,195) content-size 50x90 floating [BFC] 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
@ -88,7 +88,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <(anonymous)> at (280,215) content-size 50x0 children: inline
TextNode <#text>
TextNode <#text>
BlockContainer <h1> at (365,185) content-size 100x100 floating children: inline
BlockContainer <h1> at (365,185) content-size 100x100 floating [BFC] children: inline
line 0 width: 56.416015, height: 10, bottom: 10, baseline: 7.998046
frag 0 from TextNode start: 0, length: 11, rect: [365,185 56.416015x10]
"sing to me,"