summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tests/LibWeb/Layout/expected/blockify-layout-internal-box-without-crashing.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/display-table-inline-children.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/auto-height.txt4
-rw-r--r--Tests/LibWeb/Layout/expected/table/auto-margins.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/basic.txt6
-rw-r--r--Tests/LibWeb/Layout/expected/table/borders.txt48
-rw-r--r--Tests/LibWeb/Layout/expected/table/cell-px-height.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt4
-rw-r--r--Tests/LibWeb/Layout/expected/table/fixed-margins.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/in-auto-height-flex-item.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/inline-table-width.txt8
-rw-r--r--Tests/LibWeb/Layout/expected/table/row-px-height.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/rows-height-distribution-1.txt4
-rw-r--r--Tests/LibWeb/Layout/expected/table/rows-height-distribution-2.txt4
-rw-r--r--Tests/LibWeb/Layout/expected/table/rows-height-distribution-3.txt4
-rw-r--r--Tests/LibWeb/Layout/expected/table/rows-height-distribution-4.txt4
-rw-r--r--Tests/LibWeb/Layout/expected/table/rowspan.txt22
-rw-r--r--Tests/LibWeb/Layout/expected/table/size.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/table-width.txt2
-rw-r--r--Tests/LibWeb/Layout/expected/table/zero-columns-gridmax.txt2
-rw-r--r--Userland/Libraries/LibWeb/CMakeLists.txt1
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.cpp3
-rw-r--r--Userland/Libraries/LibWeb/Layout/FormattingContext.cpp1
-rw-r--r--Userland/Libraries/LibWeb/Layout/TableCellBox.cpp38
-rw-r--r--Userland/Libraries/LibWeb/Layout/TableCellBox.h25
-rw-r--r--Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp12
-rw-r--r--Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp3
28 files changed, 75 insertions, 138 deletions
diff --git a/Tests/LibWeb/Layout/expected/blockify-layout-internal-box-without-crashing.txt b/Tests/LibWeb/Layout/expected/blockify-layout-internal-box-without-crashing.txt
index 8d6174499c..3d5f443146 100644
--- a/Tests/LibWeb/Layout/expected/blockify-layout-internal-box-without-crashing.txt
+++ b/Tests/LibWeb/Layout/expected/blockify-layout-internal-box-without-crashing.txt
@@ -5,5 +5,5 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <table> at (8,8) content-size 0x0 [TFC] children: not-inline
Box <tbody> at (8,8) content-size 0x0 children: not-inline
Box <tr> at (8,8) content-size 0x0 children: not-inline
- TableCellBox <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
+ BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
BlockContainer <td> at (9,9) content-size 0x0 positioned [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt b/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt
index e7d7294d8e..4a3662bb24 100644
--- a/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt
+++ b/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt
@@ -5,7 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <table> at (11,11) content-size 100x100 [TFC] children: not-inline
Box <tbody> at (11,11) content-size 100x100 children: not-inline
Box <tr> at (11,11) content-size 100x100 children: not-inline
- TableCellBox <td> at (13,49.082031) content-size 96x23.835937 [BFC] children: not-inline
+ BlockContainer <td> at (13,49.082031) content-size 96x23.835937 [BFC] children: not-inline
BlockContainer <(anonymous)> at (14,50.082031) content-size 94x21.835937 children: inline
line 0 width: 0, height: 21.835937, bottom: 21.835937, baseline: 16.914062
frag 0 from TextNode start: 0, length: 0, rect: [14,50.082031 0x21.835937]
diff --git a/Tests/LibWeb/Layout/expected/display-table-inline-children.txt b/Tests/LibWeb/Layout/expected/display-table-inline-children.txt
index a4bed777af..7b969707ed 100644
--- a/Tests/LibWeb/Layout/expected/display-table-inline-children.txt
+++ b/Tests/LibWeb/Layout/expected/display-table-inline-children.txt
@@ -8,7 +8,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 784x600 [BFC] children: not-inline
Box <div.aligncenter.block-image> at (8,8) content-size 1200x600 [TFC] children: inline
Box <(anonymous)> at (8,8) content-size 1200x600 children: inline
- TableCellBox <(anonymous)> at (8,8) content-size 1200x600 [BFC] children: inline
+ BlockContainer <(anonymous)> at (8,8) content-size 1200x600 [BFC] children: inline
line 0 width: 1200, height: 600, bottom: 600, baseline: 600
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 1200x600]
TextNode <#text>
diff --git a/Tests/LibWeb/Layout/expected/table/auto-height.txt b/Tests/LibWeb/Layout/expected/table/auto-height.txt
index 025bbf5a70..1ef63a1ad8 100644
--- a/Tests/LibWeb/Layout/expected/table/auto-height.txt
+++ b/Tests/LibWeb/Layout/expected/table/auto-height.txt
@@ -5,7 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (11,11) content-size 29.15625x19.46875 [BFC] children: not-inline
Box <(anonymous)> at (11,11) content-size 29.15625x19.46875 [TFC] children: not-inline
Box <(anonymous)> at (11,11) content-size 29.15625x19.46875 children: not-inline
- TableCellBox <span> at (12,12) content-size 27.15625x17.46875 [BFC] children: inline
+ BlockContainer <span> at (12,12) content-size 27.15625x17.46875 [BFC] children: inline
line 0 width: 27.15625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [12,12 27.15625x17.46875]
"foo"
@@ -14,7 +14,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (11,32.46875) content-size 29.640625x19.46875 [BFC] children: not-inline
Box <(anonymous)> at (11,32.46875) content-size 29.640625x19.46875 [TFC] children: not-inline
Box <(anonymous)> at (11,32.46875) content-size 29.640625x19.46875 children: not-inline
- TableCellBox <span> at (12,33.46875) content-size 27.640625x17.46875 [BFC] children: inline
+ BlockContainer <span> at (12,33.46875) content-size 27.640625x17.46875 [BFC] children: inline
line 0 width: 27.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [12,33.46875 27.640625x17.46875]
"bar"
diff --git a/Tests/LibWeb/Layout/expected/table/auto-margins.txt b/Tests/LibWeb/Layout/expected/table/auto-margins.txt
index 1e17ee997a..fa6c002274 100644
--- a/Tests/LibWeb/Layout/expected/table/auto-margins.txt
+++ b/Tests/LibWeb/Layout/expected/table/auto-margins.txt
@@ -5,7 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (235.265625,8) content-size 329.46875x17.46875 [BFC] children: not-inline
Box <div.box> at (235.265625,8) content-size 329.46875x17.46875 [TFC] children: not-inline
Box <(anonymous)> at (235.265625,8) content-size 329.46875x17.46875 children: not-inline
- TableCellBox <div.cell> at (235.265625,8) content-size 329.46875x17.46875 [BFC] children: inline
+ BlockContainer <div.cell> at (235.265625,8) content-size 329.46875x17.46875 [BFC] children: inline
line 0 width: 329.46875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 34, rect: [235.265625,8 329.46875x17.46875]
"DaTa DisplaYiNg CSS WeBpaGE ScReEn"
diff --git a/Tests/LibWeb/Layout/expected/table/basic.txt b/Tests/LibWeb/Layout/expected/table/basic.txt
index dd0f9a1bbd..2b74245eae 100644
--- a/Tests/LibWeb/Layout/expected/table/basic.txt
+++ b/Tests/LibWeb/Layout/expected/table/basic.txt
@@ -20,7 +20,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,8) content-size 95.171875x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,9) content-size 93.171875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,9) content-size 93.171875x17.46875 [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"
@@ -37,7 +37,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,27.46875) content-size 95.171875x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,28.46875) content-size 93.171875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,28.46875) content-size 93.171875x17.46875 [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"
@@ -54,7 +54,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,46.9375) content-size 95.171875x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,47.9375) content-size 93.171875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,47.9375) content-size 93.171875x17.46875 [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"
diff --git a/Tests/LibWeb/Layout/expected/table/borders.txt b/Tests/LibWeb/Layout/expected/table/borders.txt
index 3fe4ee1fde..7de30aa836 100644
--- a/Tests/LibWeb/Layout/expected/table/borders.txt
+++ b/Tests/LibWeb/Layout/expected/table/borders.txt
@@ -9,14 +9,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (9,9) content-size 166.296875x21.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (11,11) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (11,11) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 82.015625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 9, rect: [11,11 82.015625x17.46875]
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (97.015625,11) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (97.015625,11) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 76.28125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [97.015625,11 76.28125x17.46875]
"Lastname"
@@ -28,14 +28,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (9,30.46875) content-size 166.296875x21.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (11,32.46875) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (11,32.46875) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 44.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [11,32.46875 44.65625x17.46875]
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (97.015625,32.46875) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (97.015625,32.46875) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [97.015625,32.46875 53.671875x17.46875]
"Griffin"
@@ -47,14 +47,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (9,51.9375) content-size 166.296875x21.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (11,53.9375) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (11,53.9375) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 35.125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [11,53.9375 35.125x17.46875]
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (97.015625,53.9375) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (97.015625,53.9375) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [97.015625,53.9375 53.671875x17.46875]
"Griffin"
@@ -74,14 +74,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,74.40625) content-size 164.296875x20.46875 children: not-inline
BlockContainer <(anonymous)> at (8,74.40625) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,75.40625) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,75.40625) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 82.015625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 9, rect: [9,75.40625 82.015625x17.46875]
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> at (8,74.40625) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (95.015625,75.40625) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (95.015625,75.40625) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 76.28125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [95.015625,75.40625 76.28125x17.46875]
"Lastname"
@@ -93,14 +93,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,94.875) content-size 164.296875x21.46875 children: not-inline
BlockContainer <(anonymous)> at (8,74.40625) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,96.875) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,96.875) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 44.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [9,96.875 44.65625x17.46875]
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> at (8,74.40625) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (95.015625,96.875) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (95.015625,96.875) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [95.015625,96.875 53.671875x17.46875]
"Griffin"
@@ -112,14 +112,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,116.34375) content-size 164.296875x20.46875 children: not-inline
BlockContainer <(anonymous)> at (8,74.40625) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,118.34375) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,118.34375) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 35.125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [9,118.34375 35.125x17.46875]
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> at (8,74.40625) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (95.015625,118.34375) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (95.015625,118.34375) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [95.015625,118.34375 53.671875x17.46875]
"Griffin"
@@ -138,14 +138,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.table-row.border-black> at (8,136.8125) content-size 160.296875x18.46875 children: not-inline
BlockContainer <(anonymous)> at (8,136.8125) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.border-black> at (8,136.8125) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.border-black> at (8,136.8125) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 82.015625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 9, rect: [8,136.8125 82.015625x17.46875]
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> at (8,136.8125) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.border-black> at (92.015625,136.8125) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.border-black> at (92.015625,136.8125) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 76.28125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [92.015625,136.8125 76.28125x17.46875]
"Lastname"
@@ -157,14 +157,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.table-row.border-black> at (8,155.28125) content-size 160.296875x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,136.8125) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.border-black> at (8,156.28125) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.border-black> at (8,156.28125) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 44.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [8,156.28125 44.65625x17.46875]
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> at (8,136.8125) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.border-black> at (92.015625,156.28125) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.border-black> at (92.015625,156.28125) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [92.015625,156.28125 53.671875x17.46875]
"Griffin"
@@ -176,14 +176,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.table-row.border-black> at (8,174.75) content-size 160.296875x18.46875 children: not-inline
BlockContainer <(anonymous)> at (8,136.8125) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.border-black> at (8,175.75) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.border-black> at (8,175.75) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 35.125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [8,175.75 35.125x17.46875]
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> at (8,136.8125) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.border-black> at (92.015625,175.75) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.border-black> at (92.015625,175.75) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [92.015625,175.75 53.671875x17.46875]
"Griffin"
@@ -202,14 +202,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.table-row.thick-border-black> at (8,193.21875) content-size 178.296875x27.46875 children: not-inline
BlockContainer <(anonymous)> at (8,193.21875) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.thick-border-black> at (8,193.21875) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.thick-border-black> at (8,193.21875) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 82.015625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 9, rect: [8,193.21875 82.015625x17.46875]
"Firstname"
TextNode <#text>
BlockContainer <(anonymous)> at (8,193.21875) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.thick-border-black> at (110.015625,193.21875) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.thick-border-black> at (110.015625,193.21875) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 76.28125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [110.015625,193.21875 76.28125x17.46875]
"Lastname"
@@ -221,14 +221,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.table-row.thick-border-black> at (8,220.6875) content-size 178.296875x37.46875 children: not-inline
BlockContainer <(anonymous)> at (8,193.21875) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.thick-border-black> at (8,230.6875) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.thick-border-black> at (8,230.6875) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 44.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [8,230.6875 44.65625x17.46875]
"Peter"
TextNode <#text>
BlockContainer <(anonymous)> at (8,193.21875) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.thick-border-black> at (110.015625,230.6875) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.thick-border-black> at (110.015625,230.6875) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [110.015625,230.6875 53.671875x17.46875]
"Griffin"
@@ -240,14 +240,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <div.table-row.thick-border-black> at (8,258.15625) content-size 178.296875x27.46875 children: not-inline
BlockContainer <(anonymous)> at (8,193.21875) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.thick-border-black> at (8,268.15625) content-size 82.015625x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.thick-border-black> at (8,268.15625) content-size 82.015625x17.46875 [BFC] children: inline
line 0 width: 35.125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [8,268.15625 35.125x17.46875]
"Lois"
TextNode <#text>
BlockContainer <(anonymous)> at (8,193.21875) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <div.table-cell.thick-border-black> at (110.015625,268.15625) content-size 76.28125x17.46875 [BFC] children: inline
+ BlockContainer <div.table-cell.thick-border-black> at (110.015625,268.15625) content-size 76.28125x17.46875 [BFC] children: inline
line 0 width: 53.671875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 7, rect: [110.015625,268.15625 53.671875x17.46875]
"Griffin"
diff --git a/Tests/LibWeb/Layout/expected/table/cell-px-height.txt b/Tests/LibWeb/Layout/expected/table/cell-px-height.txt
index 5a699889d7..05c851c57a 100644
--- a/Tests/LibWeb/Layout/expected/table/cell-px-height.txt
+++ b/Tests/LibWeb/Layout/expected/table/cell-px-height.txt
@@ -3,4 +3,4 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 102x100 [BFC] children: not-inline
Box <body> at (8,8) content-size 102x100 [TFC] children: not-inline
Box <div.row> at (8,8) content-size 102x100 children: not-inline
- TableCellBox <div.cell> at (9,9) content-size 100x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (9,9) content-size 100x0 [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt b/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt
index 8cfe102730..88f69381f4 100644
--- a/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt
+++ b/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt
@@ -7,9 +7,9 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
Box <tbody> at (9,9) content-size 780x90.21875 children: not-inline
Box <tr> at (9,9) content-size 780x90.21875 children: not-inline
- TableCellBox <td.mbox-image> at (10,29.109375) content-size 50x50 [BFC] children: not-inline
+ BlockContainer <td.mbox-image> at (10,29.109375) content-size 50x50 [BFC] children: not-inline
BlockContainer <div.mbox-image-div> at (10,29.109375) content-size 50x50 children: not-inline
- TableCellBox <td.mbox-text> at (62,10) content-size 726x88.21875 [BFC] children: inline
+ BlockContainer <td.mbox-text> at (62,10) content-size 726x88.21875 [BFC] children: inline
line 0 width: 689.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 1, length: 84, rect: [62,10 689.640625x17.46875]
"In a scene set in a lawyer's office, the lawyer sits alone and bounces a rubber ball"
diff --git a/Tests/LibWeb/Layout/expected/table/fixed-margins.txt b/Tests/LibWeb/Layout/expected/table/fixed-margins.txt
index c2945e882b..f9ff853e50 100644
--- a/Tests/LibWeb/Layout/expected/table/fixed-margins.txt
+++ b/Tests/LibWeb/Layout/expected/table/fixed-margins.txt
@@ -5,7 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (108,8) content-size 584x35.40625 [BFC] children: not-inline
Box <div.box> at (108,8) content-size 584x35.40625 [TFC] children: not-inline
Box <(anonymous)> at (108,8) content-size 584x35.40625 children: not-inline
- TableCellBox <div.cell> at (108,8) content-size 584x35.40625 [BFC] children: inline
+ BlockContainer <div.cell> at (108,8) content-size 584x35.40625 [BFC] children: inline
line 0 width: 569.859375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 58, rect: [108,8 569.859375x17.46875]
"DaTa DisplaYiNg CSS WeBpaGE ScReEn OF aR AddITioN COmmOnLY"
diff --git a/Tests/LibWeb/Layout/expected/table/in-auto-height-flex-item.txt b/Tests/LibWeb/Layout/expected/table/in-auto-height-flex-item.txt
index f1ff5f9702..6175d1121a 100644
--- a/Tests/LibWeb/Layout/expected/table/in-auto-height-flex-item.txt
+++ b/Tests/LibWeb/Layout/expected/table/in-auto-height-flex-item.txt
@@ -5,7 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (11,11) content-size 41.78125x19.46875 [BFC] children: not-inline
Box <(anonymous)> at (11,11) content-size 41.78125x19.46875 [TFC] children: not-inline
Box <(anonymous)> at (11,11) content-size 41.78125x19.46875 children: not-inline
- TableCellBox <div.cell> at (12,12) content-size 39.78125x17.46875 [BFC] children: inline
+ BlockContainer <div.cell> at (12,12) content-size 39.78125x17.46875 [BFC] children: inline
line 0 width: 39.78125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [12,12 39.78125x17.46875]
"Hello"
diff --git a/Tests/LibWeb/Layout/expected/table/inline-table-width.txt b/Tests/LibWeb/Layout/expected/table/inline-table-width.txt
index 12bf3352bf..29cf840176 100644
--- a/Tests/LibWeb/Layout/expected/table/inline-table-width.txt
+++ b/Tests/LibWeb/Layout/expected/table/inline-table-width.txt
@@ -8,23 +8,23 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <(anonymous)> at (9,9) content-size 129.984375x38.9375 inline-table [TFC] children: not-inline
Box <tbody> at (9,9) content-size 129.984375x38.9375 children: not-inline
Box <tr> at (9,9) content-size 129.984375x19.46875 children: not-inline
- TableCellBox <td> at (10,10) content-size 87.90625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (10,10) content-size 87.90625x17.46875 [BFC] children: inline
line 0 width: 15.734375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 2, rect: [10,10 15.734375x17.46875]
"ID"
TextNode <#text>
- TableCellBox <td> at (99.90625,10) content-size 38.078125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (99.90625,10) content-size 38.078125x17.46875 [BFC] children: inline
line 0 width: 27.84375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [99.90625,10 27.84375x17.46875]
"null"
TextNode <#text>
Box <tr> at (9,28.46875) content-size 129.984375x19.46875 children: not-inline
- TableCellBox <td> at (10,29.46875) content-size 87.90625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (10,29.46875) content-size 87.90625x17.46875 [BFC] children: inline
line 0 width: 87.90625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 11, rect: [10,29.46875 87.90625x17.46875]
"Is Selected"
TextNode <#text>
- TableCellBox <td> at (99.90625,29.46875) content-size 38.078125x17.46875 [BFC] children: inline
+ BlockContainer <td> at (99.90625,29.46875) content-size 38.078125x17.46875 [BFC] children: inline
line 0 width: 38.078125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [99.90625,29.46875 38.078125x17.46875]
"false"
diff --git a/Tests/LibWeb/Layout/expected/table/row-px-height.txt b/Tests/LibWeb/Layout/expected/table/row-px-height.txt
index 5a699889d7..05c851c57a 100644
--- a/Tests/LibWeb/Layout/expected/table/row-px-height.txt
+++ b/Tests/LibWeb/Layout/expected/table/row-px-height.txt
@@ -3,4 +3,4 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 102x100 [BFC] children: not-inline
Box <body> at (8,8) content-size 102x100 [TFC] children: not-inline
Box <div.row> at (8,8) content-size 102x100 children: not-inline
- TableCellBox <div.cell> at (9,9) content-size 100x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (9,9) content-size 100x0 [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-1.txt b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-1.txt
index 9576ca43fd..c41b02737c 100644
--- a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-1.txt
+++ b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-1.txt
@@ -4,6 +4,6 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x150 [BFC] children: not-inline
Box <div.table> at (8,8) content-size 200x150 [TFC] children: not-inline
Box <div.row.a> at (8,8) content-size 200x50 children: not-inline
- TableCellBox <div.cell> at (8,8) content-size 200x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (8,8) content-size 200x0 [BFC] children: not-inline
Box <div.row.b> at (8,58) content-size 200x100 children: not-inline
- TableCellBox <div.cell> at (8,58) content-size 200x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (8,58) content-size 200x0 [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-2.txt b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-2.txt
index f37ca14519..6e0a49efc4 100644
--- a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-2.txt
+++ b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-2.txt
@@ -4,6 +4,6 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x300 [BFC] children: not-inline
Box <div.table> at (8,8) content-size 200x300 [TFC] children: not-inline
Box <div.row.a> at (8,8) content-size 200x150 children: not-inline
- TableCellBox <div.cell> at (8,8) content-size 200x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (8,8) content-size 200x0 [BFC] children: not-inline
Box <div.row.b> at (8,158) content-size 200x150 children: not-inline
- TableCellBox <div.cell> at (8,158) content-size 200x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (8,158) content-size 200x0 [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-3.txt b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-3.txt
index 8678e15dd5..6c0c46b224 100644
--- a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-3.txt
+++ b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-3.txt
@@ -4,13 +4,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x300 [BFC] children: not-inline
Box <div.table> at (8,8) content-size 200x300 [TFC] children: not-inline
Box <div.row.a> at (8,8) content-size 200x150 children: not-inline
- TableCellBox <div.cell> at (8,8) content-size 200x17.46875 [BFC] children: inline
+ BlockContainer <div.cell> at (8,8) content-size 200x17.46875 [BFC] children: inline
line 0 width: 9.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 9.34375x17.46875]
"a"
TextNode <#text>
Box <div.row.b> at (8,158) content-size 200x150 children: not-inline
- TableCellBox <div.cell> at (8,158) content-size 200x17.46875 [BFC] children: inline
+ BlockContainer <div.cell> at (8,158) content-size 200x17.46875 [BFC] children: inline
line 0 width: 9.46875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,158 9.46875x17.46875]
"b"
diff --git a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-4.txt b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-4.txt
index e86d592cfe..27449a9baa 100644
--- a/Tests/LibWeb/Layout/expected/table/rows-height-distribution-4.txt
+++ b/Tests/LibWeb/Layout/expected/table/rows-height-distribution-4.txt
@@ -4,13 +4,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x300 [BFC] children: not-inline
Box <div.table> at (8,8) content-size 200x300 [TFC] children: not-inline
Box <div.row.a> at (8,8) content-size 200x100 children: not-inline
- TableCellBox <div.cell> at (8,8) content-size 200x17.46875 [BFC] children: inline
+ BlockContainer <div.cell> at (8,8) content-size 200x17.46875 [BFC] children: inline
line 0 width: 9.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,8 9.34375x17.46875]
"a"
TextNode <#text>
Box <div.row.b> at (8,108) content-size 200x200 children: not-inline
- TableCellBox <div.cell> at (8,108) content-size 200x17.46875 [BFC] children: inline
+ BlockContainer <div.cell> at (8,108) content-size 200x17.46875 [BFC] children: inline
line 0 width: 9.46875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [8,108 9.46875x17.46875]
"b"
diff --git a/Tests/LibWeb/Layout/expected/table/rowspan.txt b/Tests/LibWeb/Layout/expected/table/rowspan.txt
index cd0a7d5d32..4a1d09385f 100644
--- a/Tests/LibWeb/Layout/expected/table/rowspan.txt
+++ b/Tests/LibWeb/Layout/expected/table/rowspan.txt
@@ -13,21 +13,21 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,8) content-size 221.359375x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <th> at (9,9) content-size 70.046875x17.46875 [BFC] children: inline
+ BlockContainer <th> at (9,9) content-size 70.046875x17.46875 [BFC] children: inline
line 0 width: 70.046875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [9,9 70.046875x17.46875]
"Header 1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <th> at (81.046875,9) content-size 72.515625x17.46875 [BFC] children: inline
+ BlockContainer <th> at (81.046875,9) content-size 72.515625x17.46875 [BFC] children: inline
line 0 width: 72.515625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [81.046875,9 72.515625x17.46875]
"Header 2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <th> at (155.5625,9) content-size 72.796875x17.46875 [BFC] children: inline
+ BlockContainer <th> at (155.5625,9) content-size 72.796875x17.46875 [BFC] children: inline
line 0 width: 72.796875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 8, rect: [155.5625,9 72.796875x17.46875]
"Header 3"
@@ -39,21 +39,21 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,27.46875) content-size 221.359375x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,38.203125) content-size 70.046875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,38.203125) content-size 70.046875x17.46875 [BFC] children: inline
line 0 width: 49.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [9,38.203125 49.609375x17.46875]
"Row 1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (81.046875,28.46875) content-size 72.515625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (81.046875,28.46875) content-size 72.515625x17.46875 [BFC] children: inline
line 0 width: 41.84375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [81.046875,28.46875 41.84375x17.46875]
"Cell 1"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (155.5625,28.46875) content-size 72.796875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (155.5625,28.46875) content-size 72.796875x17.46875 [BFC] children: inline
line 0 width: 44.3125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [155.5625,28.46875 44.3125x17.46875]
"Cell 2"
@@ -65,14 +65,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,46.9375) content-size 221.359375x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (81.046875,47.9375) content-size 72.515625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (81.046875,47.9375) content-size 72.515625x17.46875 [BFC] children: inline
line 0 width: 44.59375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [81.046875,47.9375 44.59375x17.46875]
"Cell 3"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (155.5625,47.9375) content-size 72.796875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (155.5625,47.9375) content-size 72.796875x17.46875 [BFC] children: inline
line 0 width: 43.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [155.5625,47.9375 43.25x17.46875]
"Cell 4"
@@ -84,21 +84,21 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <tr> at (8,66.40625) content-size 221.359375x19.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (9,67.40625) content-size 70.046875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (9,67.40625) content-size 70.046875x17.46875 [BFC] children: inline
line 0 width: 52.078125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [9,67.40625 52.078125x17.46875]
"Row 2"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (81.046875,67.40625) content-size 72.515625x17.46875 [BFC] children: inline
+ BlockContainer <td> at (81.046875,67.40625) content-size 72.515625x17.46875 [BFC] children: inline
line 0 width: 43.953125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [81.046875,67.40625 43.953125x17.46875]
"Cell 5"
TextNode <#text>
BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
TextNode <#text>
- TableCellBox <td> at (155.5625,67.40625) content-size 72.796875x17.46875 [BFC] children: inline
+ BlockContainer <td> at (155.5625,67.40625) content-size 72.796875x17.46875 [BFC] children: inline
line 0 width: 44.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [155.5625,67.40625 44.234375x17.46875]
"Cell 6"
diff --git a/Tests/LibWeb/Layout/expected/table/size.txt b/Tests/LibWeb/Layout/expected/table/size.txt
index c774212112..15c8b439f2 100644
--- a/Tests/LibWeb/Layout/expected/table/size.txt
+++ b/Tests/LibWeb/Layout/expected/table/size.txt
@@ -4,7 +4,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (350,8) content-size 100x17.46875 [BFC] children: not-inline
Box <div> at (350,8) content-size 100x17.46875 [TFC] children: not-inline
Box <(anonymous)> at (350,8) content-size 2000x17.46875 children: not-inline
- TableCellBox <(anonymous)> at (350,8) content-size 2000x17.46875 [BFC] children: not-inline
+ BlockContainer <(anonymous)> at (350,8) content-size 2000x17.46875 [BFC] children: not-inline
BlockContainer <(anonymous)> at (350,8) content-size 2000x0 children: inline
TextNode <#text>
BlockContainer <div> at (350,8) content-size 2000x17.46875 children: inline
diff --git a/Tests/LibWeb/Layout/expected/table/table-width.txt b/Tests/LibWeb/Layout/expected/table/table-width.txt
index 7bb26a8303..b9bbb12bf7 100644
--- a/Tests/LibWeb/Layout/expected/table/table-width.txt
+++ b/Tests/LibWeb/Layout/expected/table/table-width.txt
@@ -5,4 +5,4 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
Box <table.table> at (108,108) content-size 584x10 [TFC] children: not-inline
Box <tbody> at (108,108) content-size 584x10 children: not-inline
Box <tr> at (108,108) content-size 584x10 children: not-inline
- TableCellBox <td.cell> at (109,113) content-size 582x0 [BFC] children: not-inline
+ BlockContainer <td.cell> at (109,113) content-size 582x0 [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/table/zero-columns-gridmax.txt b/Tests/LibWeb/Layout/expected/table/zero-columns-gridmax.txt
index 7ff3a69ee5..16a36e20e9 100644
--- a/Tests/LibWeb/Layout/expected/table/zero-columns-gridmax.txt
+++ b/Tests/LibWeb/Layout/expected/table/zero-columns-gridmax.txt
@@ -4,4 +4,4 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x0 [BFC] children: not-inline
Box <div.table> at (8,8) content-size 200x0 [TFC] children: not-inline
Box <div.row> at (8,8) content-size 200x0 children: not-inline
- TableCellBox <div.cell> at (8,8) content-size 200x0 [BFC] children: not-inline
+ BlockContainer <div.cell> at (8,8) content-size 200x0 [BFC] children: not-inline
diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt
index 97ae28421e..41ff064808 100644
--- a/Userland/Libraries/LibWeb/CMakeLists.txt
+++ b/Userland/Libraries/LibWeb/CMakeLists.txt
@@ -418,7 +418,6 @@ set(SOURCES
Layout/SVGGeometryBox.cpp
Layout/SVGGraphicsBox.cpp
Layout/SVGSVGBox.cpp
- Layout/TableCellBox.cpp
Layout/TableFormattingContext.cpp
Layout/TableWrapper.cpp
Layout/TextNode.cpp
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp
index c14879da4d..8b13baa04c 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Element.cpp
@@ -49,7 +49,6 @@
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Layout/InlineNode.h>
#include <LibWeb/Layout/ListItemBox.h>
-#include <LibWeb/Layout/TableCellBox.h>
#include <LibWeb/Layout/TreeBuilder.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Namespace.h>
@@ -329,7 +328,7 @@ JS::GCPtr<Layout::Node> Element::create_layout_node_for_display_type(DOM::Docume
return document.heap().allocate_without_realm<Layout::ListItemBox>(document, element, move(style));
if (display.is_table_cell())
- return document.heap().allocate_without_realm<Layout::TableCellBox>(document, element, move(style));
+ return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
if (display.is_table_column() || display.is_table_column_group() || display.is_table_caption()) {
// FIXME: This is just an incorrect placeholder until we improve table layout support.
diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
index 90c6cf171a..2216259ba9 100644
--- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp
@@ -13,7 +13,6 @@
#include <LibWeb/Layout/ReplacedBox.h>
#include <LibWeb/Layout/SVGFormattingContext.h>
#include <LibWeb/Layout/SVGSVGBox.h>
-#include <LibWeb/Layout/TableCellBox.h>
#include <LibWeb/Layout/TableFormattingContext.h>
#include <LibWeb/Layout/Viewport.h>
diff --git a/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp b/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp
deleted file mode 100644
index 4f29f7be66..0000000000
--- a/Userland/Libraries/LibWeb/Layout/TableCellBox.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#include <LibWeb/DOM/Element.h>
-#include <LibWeb/Layout/TableCellBox.h>
-
-namespace Web::Layout {
-
-TableCellBox::TableCellBox(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
- : Layout::BlockContainer(document, element, move(style))
-{
-}
-
-TableCellBox::TableCellBox(DOM::Document& document, DOM::Element* element, CSS::ComputedValues computed_values)
- : Layout::BlockContainer(document, element, move(computed_values))
-{
-}
-
-TableCellBox::~TableCellBox() = default;
-
-size_t TableCellBox::colspan() const
-{
- if (!dom_node())
- return 1;
- return verify_cast<DOM::Element>(*dom_node()).attribute(HTML::AttributeNames::colspan).to_uint().value_or(1);
-}
-
-size_t TableCellBox::rowspan() const
-{
- if (!dom_node())
- return 1;
- return verify_cast<DOM::Element>(*dom_node()).attribute(HTML::AttributeNames::rowspan).to_uint().value_or(1);
-}
-
-}
diff --git a/Userland/Libraries/LibWeb/Layout/TableCellBox.h b/Userland/Libraries/LibWeb/Layout/TableCellBox.h
deleted file mode 100644
index dc4324aa5f..0000000000
--- a/Userland/Libraries/LibWeb/Layout/TableCellBox.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#pragma once
-
-#include <LibWeb/Layout/BlockContainer.h>
-
-namespace Web::Layout {
-
-class TableCellBox final : public BlockContainer {
- JS_CELL(TableCellBox, BlockContainer);
-
-public:
- TableCellBox(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
- TableCellBox(DOM::Document&, DOM::Element*, CSS::ComputedValues);
- virtual ~TableCellBox() override;
-
- size_t colspan() const;
- size_t rowspan() const;
-};
-
-}
diff --git a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp
index 6d857ee081..1a7a82c068 100644
--- a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp
@@ -6,9 +6,9 @@
#include <LibWeb/DOM/Node.h>
#include <LibWeb/HTML/BrowsingContext.h>
+#include <LibWeb/HTML/HTMLTableCellElement.h>
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/InlineFormattingContext.h>
-#include <LibWeb/Layout/TableCellBox.h>
#include <LibWeb/Layout/TableFormattingContext.h>
struct GridPosition {
@@ -77,13 +77,17 @@ void TableFormattingContext::calculate_row_column_grid(Box const& box)
x_current++;
for (auto* child = row.first_child(); child; child = child->next_sibling()) {
- if (is<TableCellBox>(*child)) {
+ if (child->display().is_table_cell()) {
Box const* box = static_cast<Box const*>(child);
if (x_current == x_width)
x_width++;
- const size_t colspan = static_cast<TableCellBox const*>(child)->colspan();
- const size_t rowspan = static_cast<TableCellBox const*>(child)->rowspan();
+ size_t colspan = 1, rowspan = 1;
+ if (box->dom_node() && is<HTML::HTMLTableCellElement>(*box->dom_node())) {
+ auto const& node = static_cast<HTML::HTMLTableCellElement const&>(*box->dom_node());
+ colspan = node.col_span();
+ rowspan = node.row_span();
+ }
if (x_width < x_current + colspan)
x_width = x_current + colspan;
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
index 94383c748c..1844889ffc 100644
--- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
+++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
@@ -24,7 +24,6 @@
#include <LibWeb/Layout/ListItemMarkerBox.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Layout/Progress.h>
-#include <LibWeb/Layout/TableCellBox.h>
#include <LibWeb/Layout/TableWrapper.h>
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Layout/TreeBuilder.h>
@@ -550,7 +549,7 @@ void TreeBuilder::generate_missing_child_wrappers(NodeWithStyle& root)
// An anonymous table-cell box must be generated around each sequence of consecutive children of a table-row box which are not table-cell boxes. !Testcase
for_each_in_tree_with_internal_display<CSS::Display::Internal::TableRow>(root, [&](auto& parent) {
for_each_sequence_of_consecutive_children_matching(parent, is_not_table_cell, [&](auto& sequence, auto nearest_sibling) {
- wrap_in_anonymous<TableCellBox>(sequence, nearest_sibling, CSS::Display { CSS::Display::Internal::TableCell });
+ wrap_in_anonymous<BlockContainer>(sequence, nearest_sibling, CSS::Display { CSS::Display::Internal::TableCell });
});
});
}