1188061-2-nsChangeHint_UpdateComputedBSize.html (969B)
1 <!DOCTYPE HTML> 2 <html class="reftest-wait"> 3 <style> 4 5 html { writing-mode: vertical-rl; } 6 7 </style> 8 <body onload="run()"> 9 10 <p>The following image should have uniform padding around all sides.</p> 11 12 13 <div style="width: 200px; float: left; background: yellow; padding: 5px;"> 14 <div style="width: 100%"> 15 <!-- 32x32 blue image --> 16 <img style="width: 100%" src="data:image/png; charset=binary;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAChJREFUSMftzUEBAAAEBLCjf2dK8NsKrJLJp84zgUAgEAgEAoFAcGUBocYBP+pqhN4AAAAASUVORK5CYII="> 17 </div> 18 </div> 19 20 <p style="clear:left">Note that if you zoom the page after it loads 21 it fixes the problem by causing a reflow.</p> 22 23 <script> 24 25 function run() { 26 /* needs to happen after the image loads */ 27 var img = document.getElementsByTagName("img")[0]; 28 var flush_and_ignore = img.offsetTop; 29 img.parentNode.parentNode.style.width = "150px"; 30 31 document.documentElement.removeAttribute("class"); 32 } 33 34 </script>