col-change-span-bg-invalidation-002.html (1256B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <script src="/common/reftest-wait.js"></script> 4 <script src="/common/rendering-utils.js"></script> 5 <link rel="author" title="Andreu Botella" href="abotella@igalia.com"> 6 <link rel="help" href="https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds"> 7 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> 8 <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-4400"> 9 <meta name=assert content="Changing the span of a table column element will invalidate column backgrounds, even if previously any columns with backgrounds spanned no cells"> 10 <style> 11 table { 12 width: 100px; 13 height: 100px; 14 border-spacing: 0; 15 background: linear-gradient(to right, green 67%, red 67%); 16 } 17 .green { 18 background: green; 19 } 20 </style> 21 <title>CSS table column span invalidation</title> 22 <script> 23 waitForAtLeastOneFrame().then(() => { 24 const changeSpanCol = document.getElementById("changeSpan"); 25 changeSpanCol.removeAttribute("span"); 26 takeScreenshot(); 27 }); 28 </script> 29 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 30 <table> 31 <col id="changeSpan" span="2"> 32 <col> 33 <col class="green"> 34 <tr> 35 <td></td> 36 <td></td> 37 <td></td> 38 </tr> 39 </table> 40 </html>