display-list-item-height-after-dom-change.html (861B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Display: reflowing a display:list-item on dom changes - non-zero height</title> 4 <link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org"> 5 <link rel="help" href="https://drafts.csswg.org/css-display-3/#list-items"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <ul> 9 <li id="item" style="background:green"> 10 <div id="content" style="overflow:hidden">Text<div> 11 </li> 12 </ul> 13 <script> 14 test(function() { 15 document.body.offsetTop; // force layout 16 item.insertBefore(document.createTextNode("This text should have a green background"), item.firstChild); 17 content.innerHTML = ""; 18 assert_not_equals(item.clientHeight, 0, "The height of the LI should not be 0px."); 19 }, "List item height after DOM change."); 20 </script>