mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
LibWeb: Add support for table caption
Adds layout support and the CSS caption-side property.
This commit is contained in:
parent
656f72adc0
commit
940d9b98ae
15 changed files with 353 additions and 21 deletions
|
@ -1,28 +1,31 @@
|
|||
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 784x58.40625 children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x75.875 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
|
||||
Box <table#empty-table> at (8,8) content-size 0x0 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 95.171875x58.40625 [BFC] children: not-inline
|
||||
Box <table#full-table> at (8,8) content-size 95.171875x58.40625 table-box [TFC] children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 95.171875x75.875 [BFC] children: not-inline
|
||||
Box <table#full-table> at (8,25.46875) content-size 95.171875x58.40625 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <caption> (not painted) [BFC] children: inline
|
||||
BlockContainer <caption> at (8,8) content-size 82.734375x17.46875 [BFC] children: inline
|
||||
line 0 width: 82.734375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 1, length: 9, rect: [14,8 82.734375x17.46875]
|
||||
"A Caption"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <thead> at (8,8) content-size 95.171875x19.46875 table-header-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (8,8) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
Box <tr> at (8,25.46875) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (9,9) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
BlockContainer <td> at (9,26.46875) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 73.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [9,9 73.65625x17.46875]
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [9,26.46875 73.65625x17.46875]
|
||||
"Head Cell"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
|
@ -34,12 +37,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
Box <tbody> at (8,27.46875) content-size 95.171875x19.46875 table-row-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (8,27.46875) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
Box <tr> at (8,44.9375) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (9,28.46875) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
BlockContainer <td> at (9,45.9375) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 70.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [9,28.46875 70.234375x17.46875]
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [9,45.9375 70.234375x17.46875]
|
||||
"Body Cell"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
|
@ -51,12 +54,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
Box <tfoot> at (8,46.9375) content-size 95.171875x19.46875 table-footer-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (8,46.9375) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
Box <tr> at (8,64.40625) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (9,47.9375) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
BlockContainer <td> at (9,65.40625) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 93.171875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 11, rect: [9,47.9375 93.171875x17.46875]
|
||||
frag 0 from TextNode start: 0, length: 11, rect: [9,65.40625 93.171875x17.46875]
|
||||
"Footer Cell"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
|
@ -65,5 +68,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,66.40625) content-size 784x0 children: inline
|
||||
BlockContainer <(anonymous)> at (8,83.875) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
|
|
69
Tests/LibWeb/Layout/expected/table/bottom-caption.txt
Normal file
69
Tests/LibWeb/Layout/expected/table/bottom-caption.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x91.875 [BFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <body> at (8,8) content-size 784x75.875 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 95.171875x75.875 [BFC] children: not-inline
|
||||
Box <table#full-table> at (8,8) content-size 95.171875x58.40625 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <caption> at (8,66.40625) content-size 82.734375x17.46875 [BFC] children: inline
|
||||
line 0 width: 82.734375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 1, length: 9, rect: [14,66.40625 82.734375x17.46875]
|
||||
"A Caption"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <thead> at (8,8) content-size 95.171875x19.46875 table-header-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (8,8) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (9,9) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 73.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [9,9 73.65625x17.46875]
|
||||
"Head Cell"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tbody> at (8,27.46875) content-size 95.171875x19.46875 table-row-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (8,27.46875) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (9,28.46875) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 70.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 9, rect: [9,28.46875 70.234375x17.46875]
|
||||
"Body Cell"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tfoot> at (8,46.9375) content-size 95.171875x19.46875 table-footer-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (8,46.9375) content-size 95.171875x19.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (9,47.9375) content-size 93.171875x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 93.171875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 11, rect: [9,47.9375 93.171875x17.46875]
|
||||
"Footer Cell"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,83.875) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
|
@ -0,0 +1,96 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x138.21875 [BFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <body> at (8,8) content-size 784x122.21875 children: not-inline
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 55.046875x122.21875 [BFC] children: not-inline
|
||||
Box <table#full-table> at (10,61.8125) content-size 55.046875x64.40625 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <caption> at (8,8) content-size 59.046875x53.8125 [BFC] children: inline
|
||||
line 0 width: 14.265625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 1, length: 1, rect: [22,8 14.265625x17.46875]
|
||||
"A"
|
||||
line 1 width: 31.765625, height: 17.9375, bottom: 35.40625, baseline: 13.53125
|
||||
frag 0 from TextNode start: 3, length: 4, rect: [14,25 31.765625x17.46875]
|
||||
"long"
|
||||
line 2 width: 59.046875, height: 18.40625, bottom: 53.34375, baseline: 13.53125
|
||||
frag 0 from TextNode start: 8, length: 7, rect: [8,42 59.046875x17.46875]
|
||||
"caption"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <thead> at (10,10) content-size 55.046875x21.46875 table-header-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (10,61.8125) content-size 55.046875x21.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (12,63.8125) content-size 22.208835x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 20.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [12,63.8125 20.609375x17.46875]
|
||||
"A1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (38.208835,63.8125) content-size 24.838039x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 23.078125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [38.208835,63.8125 23.078125x17.46875]
|
||||
"A2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tbody> at (10,31.46875) content-size 55.046875x21.46875 table-row-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (10,83.28125) content-size 55.046875x21.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (12,85.28125) content-size 22.208835x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 15.6875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [12,85.28125 15.6875x17.46875]
|
||||
"B1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (38.208835,85.28125) content-size 24.838039x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 18.15625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [38.208835,85.28125 18.15625x17.46875]
|
||||
"B2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tfoot> at (10,52.9375) content-size 55.046875x21.46875 table-footer-group children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (10,104.75) content-size 55.046875x21.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (12,106.75) content-size 22.208835x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 18.890625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [12,106.75 18.890625x17.46875]
|
||||
"F1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (38.208835,106.75) content-size 24.838039x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 21.359375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 2, rect: [38.208835,106.75 21.359375x17.46875]
|
||||
"F2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,130.21875) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
Loading…
Add table
Add a link
Reference in a new issue