diff --git a/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt b/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt new file mode 100644 index 0000000000..8d2cdcefe0 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/table/columns-width-distribution-1.txt @@ -0,0 +1,28 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x108.21875 children: not-inline + BlockContainer at (8,8) content-size 784x92.21875 children: not-inline + TableWrapper <(anonymous)> at (8,8) content-size 782x92.21875 children: not-inline + TableBox at (9,9) content-size 782x90.21875 children: not-inline + BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline + TextNode <#text> + TableRowGroupBox at (9,9) content-size 782x90.21875 children: not-inline + TableRowBox at (9,9) content-size 782x90.21875 children: not-inline + TableCellBox at (10,29.109375) content-size 50x50 children: not-inline + BlockContainer at (10,29.109375) content-size 50x50 children: not-inline + TableCellBox at (62,10) content-size 728x88.21875 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" + line 1 width: 695.5625, height: 17.9375, bottom: 35.40625, baseline: 13.53125 + frag 0 from TextNode start: 86, length: 84, rect: [62,27 695.5625x17.46875] + "against the wall. They receive a call from their assistant who expresses frustration" + line 2 width: 703.125, height: 18.40625, bottom: 53.34375, baseline: 13.53125 + frag 0 from TextNode start: 171, length: 85, rect: [62,44 703.125x17.46875] + "over a packed waiting room and the lawyer's lack of clients. The lawyer then looks at" + line 3 width: 695.90625, height: 17.875, bottom: 70.28125, baseline: 13.53125 + frag 0 from TextNode start: 257, length: 81, rect: [62,62 695.90625x17.46875] + "some papers from a large envelope, which turn out to be divorce papers from their" + line 4 width: 725.734375, height: 18.34375, bottom: 88.21875, baseline: 13.53125 + frag 0 from TextNode start: 339, length: 92, rect: [62,79 725.734375x17.46875] + "significant other. Finally, the lawyer instructs their assistant to send in the next client." + TextNode <#text> diff --git a/Tests/LibWeb/Layout/expected/table/size.txt b/Tests/LibWeb/Layout/expected/table/size.txt index 2b7a15a74c..e67c1421a0 100644 --- a/Tests/LibWeb/Layout/expected/table/size.txt +++ b/Tests/LibWeb/Layout/expected/table/size.txt @@ -3,14 +3,14 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (8,8) content-size 784x17.46875 children: not-inline TableWrapper <(anonymous)> at (350,8) content-size 100x17.46875 children: not-inline TableBox
at (350,8) content-size 100x17.46875 children: not-inline - TableRowBox <(anonymous)> at (350,8) content-size 100x17.46875 children: not-inline - TableCellBox <(anonymous)> at (350,8) content-size 100x17.46875 children: not-inline - BlockContainer <(anonymous)> at (350,8) content-size 100x0 children: inline + TableRowBox <(anonymous)> at (350,8) content-size 2000x17.46875 children: not-inline + TableCellBox <(anonymous)> at (350,8) content-size 2000x17.46875 children: not-inline + BlockContainer <(anonymous)> at (350,8) content-size 2000x0 children: inline TextNode <#text> BlockContainer
at (350,8) content-size 2000x17.46875 children: inline line 0 width: 6.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 frag 0 from TextNode start: 0, length: 1, rect: [350,8 6.34375x17.46875] "1" TextNode <#text> - BlockContainer <(anonymous)> at (350,25.46875) content-size 100x0 children: inline + BlockContainer <(anonymous)> at (350,25.46875) content-size 2000x0 children: inline TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/table/columns-width-distribution-1.html b/Tests/LibWeb/Layout/input/table/columns-width-distribution-1.html new file mode 100644 index 0000000000..00497ed4bd --- /dev/null +++ b/Tests/LibWeb/Layout/input/table/columns-width-distribution-1.html @@ -0,0 +1,22 @@ + +
+In a scene set in a lawyer's office, the lawyer sits alone and bounces a rubber ball against the wall. They receive a call from their assistant who expresses frustration over a packed waiting room and the lawyer's lack of clients. The lawyer then looks at some papers from a large envelope, which turn out to be divorce papers from their significant other. Finally, the lawyer instructs their assistant to send in the next client. +
\ No newline at end of file diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index af4d568d8e..05647e77fb 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -174,7 +174,7 @@ void BlockFormattingContext::compute_width(Box const& box, AvailableSpace const& // 10.3.3 cont'd. auto underflow_px = width_of_containing_block - total_px; - if (!isfinite(underflow_px.value())) + if (available_space.width.is_intrinsic_sizing_constraint()) underflow_px = 0; if (width.is_auto()) {