at (15,15) content-size 99.828125x54.46875 table-row children: not-inline
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer at (25,33.5) content-size 11.5625x17.46875 table-cell [BFC] children: inline
+ line 0 width: 11.5625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
+ frag 0 from TextNode start: 0, length: 1, rect: [25,33.5 11.5625x17.46875]
+ "X"
+ TextNode <#text>
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer | at (58.5625,25) content-size 48.265625x90.9375 table-cell [BFC] children: not-inline
+ BlockContainer <(anonymous)> at (58.5625,25) content-size 48.265625x0 children: inline
+ TextNode <#text>
+ TableWrapper <(anonymous)> at (58.5625,25) content-size 48.265625x90.9375 [BFC] children: not-inline
+ Box at (63.5625,30) content-size 38.265625x80.9375 table-box [TFC] children: not-inline
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ Box at (63.5625,30) content-size 34.265625x74.9375 table-row-group children: not-inline
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ Box at (65.5625,32) content-size 34.265625x37.46875 table-row children: not-inline
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer at (75.5625,42) content-size 14.265625x17.46875 table-cell [BFC] children: inline
+ line 0 width: 14.265625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
+ frag 0 from TextNode start: 0, length: 1, rect: [75.5625,42 14.265625x17.46875]
+ "A"
+ TextNode <#text>
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ Box | at (65.5625,69.46875) content-size 34.265625x37.46875 table-row children: not-inline
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer at (75.5625,81.46875) content-size 14.265625x17.46875 table-cell [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: [75.5625,81.46875 9.34375x17.46875]
+ "B"
+ 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 (58.5625,115.9375) content-size 48.265625x0 children: inline
+ TextNode <#text>
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ Box | at (15,69.46875) content-size 99.828125x54.46875 table-row children: not-inline
+ BlockContainer <(anonymous)> (not painted) children: inline
+ TextNode <#text>
+ BlockContainer at (25,89.96875) content-size 11.5625x17.46875 table-cell [BFC] children: inline
+ line 0 width: 11.09375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
+ frag 0 from TextNode start: 0, length: 1, rect: [25,89.96875 11.09375x17.46875]
+ "Y"
+ 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,132.9375) content-size 784x0 children: inline
+ TextNode <#text>
diff --git a/Tests/LibWeb/Layout/expected/table/row-span-and-nested-tables.txt b/Tests/LibWeb/Layout/expected/table/row-span-and-nested-tables.txt
index c509777b91..06503e312a 100644
--- a/Tests/LibWeb/Layout/expected/table/row-span-and-nested-tables.txt
+++ b/Tests/LibWeb/Layout/expected/table/row-span-and-nested-tables.txt
@@ -5,14 +5,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer at (8,8) content-size 784x116.40625 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
TextNode <#text>
- TableWrapper <(anonymous)> at (8,8) content-size 71.828125x116.40625 [BFC] children: not-inline
- Box at (9,9) content-size 71.828125x114.40625 table-box [TFC] children: not-inline
+ TableWrapper <(anonymous)> at (8,8) content-size 75.828125x116.40625 [BFC] children: not-inline
+ Box at (9,9) content-size 73.828125x114.40625 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
- Box at (9,9) content-size 65.828125x108.40625 table-row-group children: not-inline
+ Box at (9,9) content-size 67.828125x108.40625 table-row-group children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
- Box at (11,11) content-size 65.828125x54.203125 table-row children: not-inline
+ Box at (11,11) content-size 67.828125x54.203125 table-row children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer at (17,29.367187) content-size 11.5625x17.46875 table-cell [BFC] children: inline
@@ -22,10 +22,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
- BlockContainer | at (42.5625,17) content-size 30.265625x98.40625 table-cell [BFC] children: not-inline
- BlockContainer <(anonymous)> at (42.5625,17) content-size 30.265625x0 children: inline
+ BlockContainer | at (42.5625,17) content-size 32.265625x98.40625 table-cell [BFC] children: not-inline
+ BlockContainer <(anonymous)> at (42.5625,17) content-size 32.265625x0 children: inline
TextNode <#text>
- TableWrapper <(anonymous)> at (42.5625,17) content-size 30.265625x98.40625 [BFC] children: not-inline
+ TableWrapper <(anonymous)> at (42.5625,17) content-size 32.265625x98.40625 [BFC] children: not-inline
Box at (43.5625,18) content-size 30.265625x96.40625 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
@@ -70,13 +70,13 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
- BlockContainer <(anonymous)> at (42.5625,115.40625) content-size 30.265625x0 children: inline
+ BlockContainer <(anonymous)> at (42.5625,115.40625) content-size 32.265625x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
- Box at (11,65.203125) content-size 65.828125x54.203125 table-row children: not-inline
+ Box at (11,65.203125) content-size 67.828125x54.203125 table-row children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer at (17,85.570312) content-size 11.5625x17.46875 table-cell [BFC] children: inline
diff --git a/Tests/LibWeb/Layout/expected/table/stretch-to-fixed-height.txt b/Tests/LibWeb/Layout/expected/table/stretch-to-fixed-height.txt
index a847b324a1..f4195c93cb 100644
--- a/Tests/LibWeb/Layout/expected/table/stretch-to-fixed-height.txt
+++ b/Tests/LibWeb/Layout/expected/table/stretch-to-fixed-height.txt
@@ -1,7 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer at (8,8) content-size 784x122 children: not-inline
- TableWrapper <(anonymous)> at (8,8) content-size 2x122 [BFC] children: not-inline
+ TableWrapper <(anonymous)> at (8,8) content-size 24x122 [BFC] children: not-inline
Box at (19,19) content-size 2x100 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
diff --git a/Tests/LibWeb/Layout/expected/table/table-formation-with-rowspan-in-the-middle.txt b/Tests/LibWeb/Layout/expected/table/table-formation-with-rowspan-in-the-middle.txt
index b7aa4ef453..1d09c7811f 100644
--- a/Tests/LibWeb/Layout/expected/table/table-formation-with-rowspan-in-the-middle.txt
+++ b/Tests/LibWeb/Layout/expected/table/table-formation-with-rowspan-in-the-middle.txt
@@ -1,7 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer at (8,8) content-size 784x159.875 children: not-inline
- TableWrapper <(anonymous)> at (8,8) content-size 101.421875x159.875 [BFC] children: not-inline
+ TableWrapper <(anonymous)> at (8,8) content-size 103.421875x159.875 [BFC] children: not-inline
Box at (9,9) content-size 101.421875x157.875 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
diff --git a/Tests/LibWeb/Layout/expected/table/table-width.txt b/Tests/LibWeb/Layout/expected/table/table-width.txt
index e27dfd71ff..a718277a71 100644
--- a/Tests/LibWeb/Layout/expected/table/table-width.txt
+++ b/Tests/LibWeb/Layout/expected/table/table-width.txt
@@ -1,7 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer at (8,8) content-size 784x214 children: not-inline
- TableWrapper <(anonymous)> at (8,8) content-size 584x214 [BFC] children: not-inline
+ TableWrapper <(anonymous)> at (8,8) content-size 784x214 [BFC] children: not-inline
Box at (108,108) content-size 584x14 table-box [TFC] children: not-inline
Box at (108,108) content-size 580x10 table-row-group children: not-inline
Box at (110,110) content-size 580x10 table-row children: not-inline
diff --git a/Tests/LibWeb/Layout/input/table/nested-table-box-width.html b/Tests/LibWeb/Layout/input/table/nested-table-box-width.html
new file mode 100644
index 0000000000..3ae0011159
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/table/nested-table-box-width.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Rowspan interaction with nested tables
+
+
+
+
+
+
+
+
+ X |
+
+
+ |
+
+
+ Y |
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
index 135c78698e..ca9ccd280b 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
@@ -437,7 +437,7 @@ CSSPixels BlockFormattingContext::compute_table_box_width_inside_table_wrapper(B
});
VERIFY(table_box.has_value());
- auto table_used_width = throwaway_state.get(*table_box).content_width();
+ auto table_used_width = throwaway_state.get(*table_box).border_box_width();
return available_space.width.is_definite() ? min(table_used_width, available_width) : table_used_width;
}
| | | |