list-with-image-display-changed-001.html (890B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Lists: test list with firstchild changing display</title> 4 <link rel=help href="https://github.com/w3c/csswg-drafts/issues/2787"> 5 <link rel=match href="list-with-image-display-changed-001-ref.html"> 6 <!-- https://bugs.chromium.org/p/chromium/issues/detail?id=715288 --> 7 <meta name="assert" content=" 8 After the display of img being changed from block to inline, then back to block, 9 the final position of marker should be the same as the beginning." /> 10 11 <style> 12 li { border: 3px solid black; margin: 3px; } 13 img { display: block; } 14 </style> 15 16 <ul> 17 <li> 18 <a href="#"><img src="./resources/white.gif" width=32 height=32 /></a> 19 Some other text 20 </li> 21 </ul> 22 <script> 23 document.body.offsetTop; 24 var img = document.querySelector('a img'); 25 img.style.display = 'inline'; 26 img.offsetWidth; 27 img.style.display = 'block'; 28 </script>