replaced-fractional-height-from-aspect-ratio.html (829B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1052370" > 3 <meta name="assert" content="When determining the size of a replaced element, if it has an aspect ratio of 1/1 then the final height should be exactly equal to its width." /> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/check-layout-th.js"></script> 7 <style> 8 canvas { 9 float: left; 10 background: green; 11 } 12 </style> 13 <div style="position: relative; width: 254px; zoom: 0.8;"> 14 <canvas style="width: 30%;" width="1" height="1"></canvas> 15 <canvas style="width: 30%;" width="708" height="708"></canvas> 16 <canvas id="target" style="width: 60%;" width="2" height="1" data-offset-x="0"></canvas> 17 </div> 18 <script> 19 checkLayout('#target'); 20 </script>