mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibWeb: Fix upper limit of span when computing column measures
The maximum span limit has to be inclusive, not exclusive.
This commit is contained in:
parent
940d9b98ae
commit
50df78d2a2
3 changed files with 73 additions and 1 deletions
|
@ -0,0 +1,45 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x60.9375 [BFC] children: not-inline
|
||||
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <body> at (8,8) content-size 784x44.9375 children: not-inline
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
TableWrapper <(anonymous)> at (8,8) content-size 32.904952x44.9375 [BFC] children: not-inline
|
||||
Box <table> at (9,9) content-size 32.904952x42.9375 table-box [TFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tbody> at (9,9) content-size 34.904952x42.9375 table-row-group children: not-inline
|
||||
Box <tr> at (9,9) content-size 34.904952x21.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (11,11) content-size 17.561202x17.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: [13,11 14.265625x17.46875]
|
||||
"A"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (32.561202,11) content-size 9.34375x17.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: [32.561202,11 9.34375x17.46875]
|
||||
"B"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
Box <tr> at (9,30.46875) content-size 34.904952x21.46875 table-row children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <td> at (11,32.46875) content-size 30.904952x17.46875 table-cell [BFC] children: inline
|
||||
line 0 width: 33.3125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [11,32.46875 33.3125x17.46875]
|
||||
"CDE"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,52.9375) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Computing column measures</title>
|
||||
<style>
|
||||
table, td {
|
||||
border: 1px solid black;
|
||||
border-spacing: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">CDE</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -201,7 +201,7 @@ void TableFormattingContext::compute_table_measures()
|
|||
}
|
||||
}
|
||||
|
||||
for (size_t current_column_span = 2; current_column_span < max_cell_column_span; current_column_span++) {
|
||||
for (size_t current_column_span = 2; current_column_span <= max_cell_column_span; current_column_span++) {
|
||||
// https://www.w3.org/TR/css-tables-3/#min-content-width-of-a-column-based-on-cells-of-span-up-to-n-n--1
|
||||
Vector<Vector<CSSPixels>> cell_min_contributions_by_column_index;
|
||||
cell_min_contributions_by_column_index.resize(m_columns.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue