diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-04-29 16:27:21 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-29 16:08:48 +0200 |
commit | e54ee7de9699b496279fb6f094e67701b0406f3d (patch) | |
tree | a54bbdb352a30500754f4675ad282bc08b5c43b1 /Tests | |
parent | a04316403e0fae3848438b496acc866fc2a01313 (diff) | |
download | serenity-e54ee7de9699b496279fb6f094e67701b0406f3d.zip |
LibWeb: Exclude borders from width available for table columns
Fix table box width calculation to minus horizonal borders from space
available for columns.
Diffstat (limited to 'Tests')
4 files changed, 27 insertions, 8 deletions
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 cd7d56ea0e..388dd14f73 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 @@ -1,12 +1,12 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer <html> at (1,1) content-size 798x120 children: not-inline BlockContainer <body> at (10,10) content-size 780x102 children: not-inline - TableWrapper <(anonymous)> at (10,10) content-size 104x102 children: not-inline - TableBox <table> at (11,11) content-size 104x100 children: not-inline - TableRowGroupBox <tbody> at (11,11) content-size 104x100 children: not-inline - TableRowBox <tr> at (11,11) content-size 104x100 children: not-inline - TableCellBox <td> at (13,49.082031) content-size 100x23.835937 children: not-inline - BlockContainer <(anonymous)> at (14,50.082031) content-size 98x21.835937 children: inline + TableWrapper <(anonymous)> at (10,10) content-size 102x102 children: not-inline + TableBox <table> at (11,11) content-size 102x100 children: not-inline + TableRowGroupBox <tbody> at (11,11) content-size 102x100 children: not-inline + TableRowBox <tr> at (11,11) content-size 102x100 children: not-inline + TableCellBox <td> at (13,49.082031) content-size 98x23.835937 children: not-inline + BlockContainer <(anonymous)> at (14,50.082031) content-size 96x21.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/table/borders.txt b/Tests/LibWeb/Layout/expected/table/borders.txt index 2e26f8d3ed..1472cbd8cf 100644 --- a/Tests/LibWeb/Layout/expected/table/borders.txt +++ b/Tests/LibWeb/Layout/expected/table/borders.txt @@ -1,8 +1,8 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer <html> at (0,0) content-size 800x293.625 children: not-inline BlockContainer <body> at (8,8) content-size 784x277.625 children: not-inline - TableWrapper <(anonymous)> at (8,8) content-size 166.296875x66.40625 children: not-inline - TableBox <table.table-border-black> at (9,9) content-size 166.296875x64.40625 children: not-inline + TableWrapper <(anonymous)> at (8,8) content-size 164.296875x66.40625 children: not-inline + TableBox <table.table-border-black> at (9,9) content-size 164.296875x64.40625 children: not-inline BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline TextNode <#text> TableRowGroupBox <tbody> at (9,9) content-size 166.296875x64.40625 children: not-inline diff --git a/Tests/LibWeb/Layout/expected/table/table-width.txt b/Tests/LibWeb/Layout/expected/table/table-width.txt new file mode 100644 index 0000000000..516f6da781 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/table/table-width.txt @@ -0,0 +1,8 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer <html> at (0,0) content-size 800x226 children: not-inline + BlockContainer <body> at (8,8) content-size 784x210 children: not-inline + TableWrapper <(anonymous)> at (8,8) content-size 584x210 children: not-inline + TableBox <table.table> at (108,108) content-size 584x10 children: not-inline + TableRowGroupBox <tbody> at (108,108) content-size 584x10 children: not-inline + TableRowBox <tr> at (108,108) content-size 584x10 children: not-inline + TableCellBox <td.cell> at (109,113) content-size 582x0 children: not-inline diff --git a/Tests/LibWeb/Layout/input/table/table-width.html b/Tests/LibWeb/Layout/input/table/table-width.html new file mode 100644 index 0000000000..2ef28c48ac --- /dev/null +++ b/Tests/LibWeb/Layout/input/table/table-width.html @@ -0,0 +1,11 @@ +<style> +.table { + width: 100%; + border: 100px solid black; +} + +.cell { + height: 10px; + background-color: orange; +} +</style><table class="table"><tr><td class="cell"></td></tr></table>
\ No newline at end of file |