| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 div { | 3 div { |
| 4 text-rendering: optimizeLegibility; | 4 text-rendering: optimizeLegibility; |
| 5 white-space:nowrap; | 5 white-space:nowrap; |
| 6 } | 6 } |
| 7 </style> | 7 </style> |
| 8 <script src="../../resources/js-test.js"></script> | 8 <script src="../../resources/js-test.js"></script> |
| 9 <p>For each pair of paragraphs, the second one should be wider than the first on
e.</p> | 9 <p>For each pair of paragraphs, the second one should be wider than the first on
e.</p> |
| 10 <div id="ls0"> | 10 <div id="ls0"> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 if (child === element.lastChild) | 31 if (child === element.lastChild) |
| 32 return getWidth(child); | 32 return getWidth(child); |
| 33 var span = document.createElement('span'); | 33 var span = document.createElement('span'); |
| 34 while (child = element.firstChild) | 34 while (child = element.firstChild) |
| 35 span.appendChild(child); | 35 span.appendChild(child); |
| 36 element.appendChild(span); | 36 element.appendChild(span); |
| 37 return span.offsetWidth; | 37 return span.offsetWidth; |
| 38 } | 38 } |
| 39 | 39 |
| 40 shouldBeCloseTo('getWidth(ls005)-getWidth(ls0)', 73, 1); | 40 shouldBeCloseTo('getWidth(ls005)-getWidth(ls0)', 73, 1); |
| 41 shouldBeCloseTo('getWidth(ws005)-getWidth(ws0)', 4, 1); | 41 shouldBeCloseTo('getWidth(ws005)-getWidth(ws0)', 5, 1); // 7*0.05em = 5.6px. |
| 42 </script> | 42 </script> |
| OLD | NEW |