fractional-percent-width.html (1418B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/check-layout-th.js"></script> 5 <link rel="author" title="Jihwan Marc Kim" href="mailto:bluewhale.marc@gmail.com" /> 6 <link rel="help" href="https://crbug.com/1283025" /> 7 <meta name="flags" content="" /> 8 <meta name="assert" content="percent lengths of fractional td width should rendered correctly" /> 9 <style> 10 main div { 11 position: relative; 12 border: 1px solid black; 13 width: 400px; 14 } 15 .cell { 16 background-color: skyblue; 17 height: 20px; 18 } 19 </style> 20 <p> 21 Tests that percent lengths of fractional td width should rendered correctly 22 even it is smaller than 1. 23 </p> 24 25 <hr /> 26 <output id="log"></output> 27 <main> 28 <div> 29 <table width="100%"> 30 <tbody> 31 <tr> 32 <td class="cell" width="0.5%" data-expected-client-width="2"></td> 33 <td>0.5%</td> 34 </tr> 35 </tbody> 36 </table> 37 <table width="100%"> 38 <tbody> 39 <tr> 40 <td class="cell" width="1%" data-expected-client-width="4"></td> 41 <td>1%</td> 42 </tr> 43 </tbody> 44 </table> 45 <table width="100%"> 46 <tbody> 47 <tr> 48 <td class="cell" width="5%" data-expected-client-width="20"></td> 49 <td>5%</td> 50 </tr> 51 </tbody> 52 </table> 53 </div> 54 </main> 55 <script> 56 checkLayout(".cell"); 57 </script>