Status: PASS | Duration: 8ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-contain/content-visibility/content-visibility-095.html
<!doctype HTML> <html class="reftest-wait"> <meta charset="utf8"> <title>Content Visibility: hidden table with positioned children</title> <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> <link rel="match" href="content-visibility-095-ref.html"> <meta name="assert" content="content-visibility: hidden table with positioned children"> <script src="/common/reftest-wait.js"></script> <style> table { width: 150px; height: 150px; background: lightblue; } #positioned { position: absolute; } .hidden { content-visibility: hidden; } </style> <table id=table> <caption id=caption> <div id=positioned>Test fails if this text is visible.</div> </caption> <tr id=tr> <td id=td> <div id=positioned>Test passes if this text is visible.</div> </td> </tr> </table> <script> function runTest() { document.getElementById("table").classList.add("hidden"); document.getElementById("tr").classList.add("hidden"); document.getElementById("caption").classList.add("hidden"); requestAnimationFrame(takeScreenshot); } window.onload = () => requestAnimationFrame(runTest); </script> </html>
/css/css-contain/content-visibility/content-visibility-095-ref.html
<!doctype HTML> <html> <meta charset="utf8"> <title>Content Visibility: hidden table with positioned children (reference)</title> <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> <style> #table { width: 150px; height: 150px; background: lightblue; contain: content; } #positioned { position: absolute; } </style> <table id=table> <td> <div id=positioned>Test passes if this text is visible.</div> </td> </table>