4 <title>Table rowspan
</title>
5 <script src=
"../../resources/check-layout.js"></script>
7 td { font:
15px/
1 Ahem }
8 #div-table { display: table; border-spacing:
2px }
9 #div-row, #span-row { display: table-row }
10 #div-cell, #span-cell { display: table-cell }
11 #div-table, #div-row, #span-row, #div-cell, #span-cell{ border:
1px solid black }
14 <body onload=
"checkLayout('tr')">
15 <h3>Test for chromium bug :
<a href=
"https://code.google.com/p/chromium/issues/detail?id=254914">254914</a>. Height of fixed height cell is not proper when cell's row is under row spanning cell.
</h3>
16 <h4>Rows in rowspan should get proportional height.
</h4>
17 <h5>Test
1 - One rowSpan cell
</h5>
23 <tr data-expected-height=
"19">
24 <td rowspan=
"4">row1 col0 - rowspan=
4</td>
27 <tr data-expected-height=
"19">
30 <tr data-expected-height=
"19">
33 <tr data-expected-height=
"19">
36 <tr data-expected-height=
"19">
41 <h5>Test
2 - One rowSpan cell and specified table width
</h5>
42 <table border=
"1" width=
"607">
44 <tr data-expected-height=
"19">
45 <td rowspan=
"5">row0 col0 - rowspan=
5</td>
48 <tr data-expected-height=
"19">
51 <tr data-expected-height=
"19">
54 <tr data-expected-height=
"19">
57 <tr data-expected-height=
"19">
62 <h5>Test
3 - One rowSpan cell and specified rowSpan cell height
</h5>
68 <tr data-expected-height=
"57">
70 <td rowspan=
"4" style=
"height:300px">row1 col1 - rowspan=
4 height=
300px
</td>
72 <tr data-expected-height=
"57">
75 <tr data-expected-height=
"74">
78 <tr data-expected-height=
"75">
81 <tr data-expected-height=
"19">
87 <h5>Test
4 - One rowSpan cell and one cell have fixed height.
</h5>
93 <tr data-expected-height=
"60">
95 <td rowspan=
"4" style=
"height:300px">row1 col1 - rowspan=
4 height=
300px
</td>
97 <tr data-expected-height=
"60">
100 <tr data-expected-height=
"44">
101 <td style=
"height:40px">row3 col0 height=
40px
</td>
103 <tr data-expected-height=
"85">
106 <tr data-expected-height=
"19">
112 <h5>Test
5 - One rowSpan cell and one cell have percent height.
</h5>
118 <tr data-expected-height=
"23">
120 <td rowspan=
"4" style=
"height:300px">row1 col1 - rowspan=
4 height=
300px
</td>
122 <tr data-expected-height=
"183">
123 <td style=
"height:40%">row2 col0 height=
40%
</td>
125 <tr data-expected-height=
"41">
128 <tr data-expected-height=
"47">
131 <tr data-expected-height=
"19">
137 <h5>Test
6 - One rowSpan cell, one cell have percent height and another one cell have fixed height.
</h5>
143 <tr data-expected-height=
"19">
145 <td rowspan=
"4" style=
"height:300px">row1 col1 - rowspan=
4 height=
300px
</td>
147 <tr data-expected-height=
"183">
148 <td style=
"height:40%">row2 col0 height=
40%
</td>
150 <tr data-expected-height=
"44">
151 <td style=
"height:40px">row3 col0 height=
40px
</td>
153 <tr data-expected-height=
"49">
156 <tr data-expected-height=
"19">
162 <h5>Test
7 - One rowSpan cell and two cells have percent height but total percent is less than
100.
</h5>
168 <tr data-expected-height=
"33">
170 <td rowspan=
"4" style=
"height:300px">row1 col1 - rowspan=
4 height=
300px
</td>
172 <tr data-expected-height=
"37">
175 <tr data-expected-height=
"131">
176 <td style=
"height:30%">row3 col0 height=
30%
</td>
178 <tr data-expected-height=
"142">
179 <td style=
"height:40%">row4 col0 height=
40%
</td>
181 <tr data-expected-height=
"19">
187 <h5>Test
8 - One rowSpan cell and three cells have percent height but total percent is more than
100.
</h5>
193 <tr data-expected-height=
"203">
194 <td style=
"height:60%">row1 col0 height=
60%
</td>
195 <td rowspan=
"4" style=
"height:300px">row1 col1 - rowspan=
4 height=
300px
</td>
197 <tr data-expected-height=
"34">
198 <td style=
"height:40%">row2 col0 height=
40%
</td>
200 <tr data-expected-height=
"19">
203 <tr data-expected-height=
"34">
204 <td style=
"height:50%">row4 col0 height=
50%
</td>
206 <tr data-expected-height=
"19">
212 <h5>Test
9 - One rowSpan cell and specified cells height.
</h5>
218 <tr data-expected-height=
"74">
219 <td style=
"height:70px">row1 col0 height=
70px
</td>
220 <td rowspan=
"4" style=
"height:500px">row1 col1 - rowspan=
4 height=
500px
</td>
222 <tr data-expected-height=
"74">
223 <td style=
"height:70px">row2 col0 height=
70px
</td>
225 <tr data-expected-height=
"59">
226 <td style=
"height:30px">row3 col0 height=
30px
</td>
228 <tr data-expected-height=
"182">
229 <td style=
"height:100px">row4 col0 height=
100px
</td>
231 <tr data-expected-height=
"54">
232 <td style=
"height:50px">row5 col0 height=
50px
</td>
237 <h5>Test
10 - RowSpan and ColSpan.
</h5>
238 <table border=
"1" width=
"607">
240 <tr data-expected-height=
"34">
242 <td rowspan=
"3" colspan=
"2">row0 col1 - rowspan=
3 colspan=
2</td>
245 <tr data-expected-height=
"34">
248 <tr data-expected-height=
"34">
251 <tr data-expected-height=
"19">
252 <td colspan=
"3">row3 col0 - colspan=
3</td>
254 <tr data-expected-height=
"34">
259 <h5>Test
11 - Mix of baseline aligned and non-baseline aligned cells.
</h5>
260 <table border=
"1" width=
"607">
262 <tr data-expected-height=
"104">
263 <td style=
"height:100px">row0 col0
</td>
264 <td style=
"vertical-align:top">row0 col1 vertical-align=top
</td>
265 <td style=
"vertical-align:bottom">row0 col2 vertical-align=bottom
</td>
267 <tr data-expected-height=
"19">
270 <tr data-expected-height=
"77">
271 <td rowspan=
"4" style=
"vertical-align:text-top; height:300px">row2 col0 - rowspan=
4 vertical-align=text-top
</td>
272 <td style=
"vertical-align:sub">row2 col1 vertical-align=sub
</td>
274 <tr data-expected-height=
"77">
275 <td style=
"vertical-align:middle">row3 col1 vertical-align=middle
</td>
277 <tr data-expected-height=
"69">
278 <td style=
"vertical-align:super">row4 col1 vertical-align=super
</td>
280 <tr data-expected-height=
"91">
281 <td style=
"vertical-align:text-bottom">row5 col1 vertical-align=text-bottom
</td>
283 <tr data-expected-height=
"19">
288 <h5>Test
12 - CSS Table.
</h5>
291 <span id=
"span-cell">row0 col0
</span>
292 <div id=
"div-cell">row0 col1
</div>
293 <span id=
"span-cell">row0 col2
</span>
296 <div id=
"div-cell">row1 col0
</div>
297 <span id=
"span-cell">row1 col1
</span>
298 <div id=
"div-cell">row1 col2
</div>
301 <span id=
"span-cell">row2 col0
</span>
304 <div id=
"div-cell">row3 col0
</div>
307 <span id=
"span-cell">row4 col0
</span>
308 <span id=
"span-cell">row4 col1
</span>
309 <span id=
"span-cell">row4 col2
</span>
312 <span id=
"span-cell">row5 col0
</span>
313 <div id=
"div-cell">row5 col1
</div>
314 <span id=
"span-cell">row5 col2
</span>
317 <div id=
"div-cell">row6 col0
</div>
318 <span id=
"span-cell">row6 col1
</span>
321 <div id=
"div-cell">row7 col0
</div>
324 <span id=
"span-cell">row8 col0
</span>
327 <div id=
"div-cell">row9 col0
</div>
330 <div id=
"div-cell">row10 col0
</div>
333 <h5>Test
13 - Table Similar to CSS table with rowspan.
</h5>
335 <tr data-expected-height=
"21">
336 <td rowspan=
5 style=
"height:300px">row0 col0
</td>
340 <tr data-expected-height=
"87">
341 <td rowspan=
3 style=
"height:200px">row1 col1
</td>
342 <td rowspan=
2 style=
"height:100px">row1 col2
</td>
345 <tr data-expected-height=
"96">
348 <tr data-expected-height=
"40">
351 <tr data-expected-height=
"24">
356 <tr data-expected-height=
"19">
361 <tr data-expected-height=
"0">
362 <td rowspan=
5 style=
"height:200px">row6 col0
</td>
363 <td rowspan=
5 style=
"height:100px">row6 col1
</td>
365 <tr data-expected-height=
"37">
368 <tr data-expected-height=
"38">
371 <tr data-expected-height=
"49">
374 <tr data-expected-height=
"49">