mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
LibWeb: Derive baseline from rightmost descendant
Make the existing algorithm recursive, accounting for boxes which contain line boxes indirectly. Fixes some button alignment issues on Wikipedia.
This commit is contained in:
parent
2a8f558911
commit
bab1d09d92
14 changed files with 188 additions and 36 deletions
|
@ -6,7 +6,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.horizontal> at (8,8) content-size 784x199.34375 children: inline
|
||||
line 0 width: 163.90625, height: 199.34375, bottom: 199.34375, baseline: 199.34375
|
||||
line 0 width: 163.90625, height: 199.34375, bottom: 199.34375, baseline: 193.40625
|
||||
frag 0 from BlockContainer start: 0, length: 0, rect: [9,9 161.90625x197.34375]
|
||||
TextNode <#text>
|
||||
BlockContainer <table> at (9,9) content-size 161.90625x197.34375 inline-block [BFC] children: not-inline
|
||||
|
@ -143,11 +143,11 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
frag 0 from TextNode start: 0, length: 1, rect: [140.8125,177.875 8.453125x17.46875]
|
||||
"5"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (9,9) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (9,9) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (9,9) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,207.34375) content-size 784x0 children: inline
|
||||
|
@ -192,11 +192,14 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [119.8125,127.40625 51.09375x39.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [9,166.875 161.90625x39.46875]
|
||||
PaintableBox (Box<TR>) [9,166.875 161.90625x39.46875] overflow: [9,9 161.90625x197.34375]
|
||||
PaintableWithLines (BlockContainer<TD>) [9,166.875 56.265625x39.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [65.265625,166.875 54.546875x39.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<TD>) [119.8125,166.875 51.09375x39.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [9,9 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [9,9 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [9,9 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,207.34375 784x0]
|
||||
|
|
|
@ -1,7 +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 784x46.9375 children: inline
|
||||
line 0 width: 137.984375, height: 46.9375, bottom: 46.9375, baseline: 46.9375
|
||||
line 0 width: 137.984375, height: 46.9375, bottom: 46.9375, baseline: 39
|
||||
frag 0 from BlockContainer start: 0, length: 0, rect: [9,9 135.984375x44.9375]
|
||||
BlockContainer <table> at (9,9) content-size 135.984375x44.9375 inline-block [BFC] children: not-inline
|
||||
TableWrapper <(anonymous)> at (9,9) content-size 135.984375x44.9375 inline-block [BFC] children: not-inline
|
||||
|
|
|
@ -52,11 +52,11 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
frag 0 from TextNode start: 0, length: 1, rect: [75.5625,81.46875 9.34375x17.46875]
|
||||
"B"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (58.5625,25) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (58.5625,25) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (58.5625,25) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (58.5625,115.9375) content-size 48.265625x0 children: inline
|
||||
TextNode <#text>
|
||||
|
@ -95,14 +95,17 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<TD>) [48.5625,15 68.265625x110.9375]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [58.5625,25 48.265625x0]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [58.5625,25 48.265625x90.9375]
|
||||
PaintableBox (Box<TABLE>) [58.5625,25 48.265625x90.9375]
|
||||
PaintableBox (Box<TBODY>) [63.5625,30 34.265625x74.9375] overflow: [63.5625,30 36.265625x78.9375]
|
||||
PaintableBox (Box<TABLE>) [58.5625,25 48.265625x90.9375] overflow: [58.5625,25 43.265625x85.9375]
|
||||
PaintableBox (Box<TBODY>) [63.5625,30 34.265625x74.9375] overflow: [58.5625,25 41.265625x83.9375]
|
||||
PaintableBox (Box<TR>) [65.5625,32 34.265625x37.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [65.5625,32 34.265625x37.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [65.5625,71.46875 34.265625x37.46875]
|
||||
PaintableBox (Box<TR>) [65.5625,71.46875 34.265625x37.46875] overflow: [58.5625,25 41.265625x83.9375]
|
||||
PaintableWithLines (BlockContainer<TD>) [65.5625,71.46875 34.265625x37.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [58.5625,25 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [58.5625,25 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [58.5625,25 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [58.5625,115.9375 48.265625x0]
|
||||
PaintableBox (Box<TR>) [15,71.46875 99.828125x54.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [15,71.46875 31.5625x54.46875]
|
||||
|
|
|
@ -64,11 +64,11 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
frag 0 from TextNode start: 0, length: 1, rect: [51.5625,88.9375 10.3125x17.46875]
|
||||
"C"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (42.5625,17) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (42.5625,17) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
BlockContainer <(anonymous)> at (42.5625,17) content-size 0x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (42.5625,115.40625) content-size 32.265625x0 children: inline
|
||||
TextNode <#text>
|
||||
|
@ -107,17 +107,20 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<TD>) [36.5625,11 44.265625x110.40625]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [42.5625,17 32.265625x0]
|
||||
PaintableWithLines (TableWrapper(anonymous)) [42.5625,17 32.265625x98.40625]
|
||||
PaintableBox (Box<TABLE>) [42.5625,17 32.265625x98.40625]
|
||||
PaintableBox (Box<TBODY>) [43.5625,18 26.265625x88.40625] overflow: [43.5625,18 28.265625x94.40625]
|
||||
PaintableBox (Box<TABLE>) [42.5625,17 32.265625x98.40625] overflow: [42.5625,17 31.265625x97.40625]
|
||||
PaintableBox (Box<TBODY>) [43.5625,18 26.265625x88.40625] overflow: [42.5625,17 29.265625x95.40625]
|
||||
PaintableBox (Box<TR>) [45.5625,20 26.265625x29.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [45.5625,20 26.265625x29.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [45.5625,51.46875 26.265625x29.46875]
|
||||
PaintableWithLines (BlockContainer<TD>) [45.5625,51.46875 26.265625x29.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableBox (Box<TR>) [45.5625,82.9375 26.265625x29.46875]
|
||||
PaintableBox (Box<TR>) [45.5625,82.9375 26.265625x29.46875] overflow: [42.5625,17 29.265625x95.40625]
|
||||
PaintableWithLines (BlockContainer<TD>) [45.5625,82.9375 26.265625x29.46875]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [42.5625,17 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [42.5625,17 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [42.5625,17 0x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [42.5625,115.40625 32.265625x0]
|
||||
PaintableBox (Box<TR>) [11,67.203125 67.828125x54.203125]
|
||||
PaintableWithLines (BlockContainer<TD>) [11,67.203125 23.5625x54.1875]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue