LibWeb: Set line height for table boxes generated during fixup

This commit is contained in:
Andi Gallo 2023-08-30 01:51:54 +00:00 committed by Andreas Kling
parent b3fa79e64d
commit fab4d543f6
Notes: sideshowbarker 2024-07-17 23:00:03 +09:00
2 changed files with 17 additions and 16 deletions

View file

@ -2,18 +2,18 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x216 [BFC] children: not-inline
TableWrapper <(anonymous)> at (9,9) content-size 300x200 [BFC] children: not-inline
Box <body.table> at (10,10) content-size 298x198 table-box [TFC] children: not-inline
Box <div.bottom> at (10,10) content-size 298x0 table-footer-group children: inline
Box <(anonymous)> at (10,10) content-size 298x0 table-row children: inline
BlockContainer <(anonymous)> at (10,10) content-size 298x0 table-cell [BFC] children: inline
line 0 width: 56.109375, height: 0, bottom: 0, baseline: 4.796875
frag 0 from TextNode start: 0, length: 6, rect: [10,10 56.109375x0]
Box <div.bottom> at (10,10) content-size 298x99 table-footer-group children: inline
Box <(anonymous)> at (10,10) content-size 298x99 table-row children: inline
BlockContainer <(anonymous)> at (10,10) content-size 298x17.46875 table-cell [BFC] children: inline
line 0 width: 56.109375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [10,10 56.109375x17.46875]
"bottom"
TextNode <#text>
Box <div.top> at (10,10) content-size 298x0 table-header-group children: inline
Box <(anonymous)> at (10,10) content-size 298x0 table-row children: inline
BlockContainer <(anonymous)> at (10,10) content-size 298x0 table-cell [BFC] children: inline
line 0 width: 26.640625, height: 0, bottom: 0, baseline: 4.796875
frag 0 from TextNode start: 0, length: 3, rect: [10,10 26.640625x0]
Box <div.top> at (10,109) content-size 298x99 table-header-group children: inline
Box <(anonymous)> at (10,109) content-size 298x99 table-row children: inline
BlockContainer <(anonymous)> at (10,109) content-size 298x17.46875 table-cell [BFC] children: inline
line 0 width: 26.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [10,109 26.640625x17.46875]
"top"
TextNode <#text>
@ -21,11 +21,11 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x218]
PaintableWithLines (TableWrapper(anonymous)) [9,9 300x200]
PaintableBox (Box<BODY>.table) [9,9 300x200]
PaintableBox (Box<DIV>.bottom) [10,10 298x0]
PaintableBox (Box(anonymous)) [10,10 298x0]
PaintableWithLines (BlockContainer(anonymous)) [10,10 298x0]
PaintableBox (Box<DIV>.bottom) [10,10 298x99]
PaintableBox (Box(anonymous)) [10,10 298x99]
PaintableWithLines (BlockContainer(anonymous)) [10,10 298x99]
TextPaintable (TextNode<#text>)
PaintableBox (Box<DIV>.top) [10,10 298x0]
PaintableBox (Box(anonymous)) [10,10 298x0]
PaintableWithLines (BlockContainer(anonymous)) [10,10 298x0]
PaintableBox (Box<DIV>.top) [10,109 298x99]
PaintableBox (Box(anonymous)) [10,109 298x99]
PaintableWithLines (BlockContainer(anonymous)) [10,109 298x99]
TextPaintable (TextNode<#text>)

View file

@ -587,6 +587,7 @@ static void wrap_in_anonymous(Vector<JS::Handle<Node>>& sequence, Node* nearest_
wrapper->append_child(*child);
}
wrapper->set_children_are_inline(parent.children_are_inline());
wrapper->set_line_height(parent.line_height());
if (nearest_sibling)
parent.insert_before(*wrapper, *nearest_sibling);
else