visibility-collapse-colspan-crash.html (1594B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <link rel="author" title="Joy Yu" href="mailto:joysyu@mit.edu"> 5 <link rel="help" href="https://drafts.csswg.org/css-tables-3/#visibility-collapse-cell-rendering"> 6 <h1>Visibility collapse</h1> 7 <a href="https://drafts.csswg.org/css-tables-3/#computing-the-table-width">Spec</a> 8 <p> 9 When a row is collapsed, a cell spanning the row may get clipped. When the row is then uncollapsed, 10 the browser should not crash because the cell's children should be correctly updated and laid out. 11 </p> 12 <table> 13 <col style="background-color:red;"> 14 <col id="colToCollapse" style="background-color: blue;"> 15 <col style="background-color: green;"> 16 <tr> 17 <td class="firstCol">Row 1</td> 18 <td>Row 1 wordword</td> 19 <td class="thirdCol">Row 1 wordwordword</td> 20 </tr> 21 <tr> 22 <td class="firstCol">Row 2</td> 23 <td>Row 2 wordwordword</td> 24 <td class="thirdCol">Row 2 wordword</td> 25 </tr> 26 <tr> 27 <td class="firstCol">Row 3</td> 28 <td>Row 3 word</td> 29 <td class="thirdCol">Row 3 wordwordwordword</td> 30 </tr> 31 <tr> 32 <td colspan="3">superlongwordsuperlongwordsuper shouldbeclipped</td> 33 </tr> 34 </table> 35 36 <script> 37 test(() => { 38 col = document.getElementById("colToCollapse"); 39 col.style.visibility = "collapse"; 40 step_timeout(function(){ col.style.visibility = "visible"; }, 500); 41 step_timeout(function(){ col.style.visibility = "collapse"; }, 1000); 42 }, "No crash or assertion failure. crbug.com/174167"); 43 </script>