| <html> |
| <head> |
| <meta name="viewport" content="user-scalable=no, width=320"> |
| <title><rdar://problem/6646628> Text Autosizing: Overlapping text in message</title> |
| <script> |
| if (window.internals) { |
| internals.settings.setTextAutosizingEnabled(true); |
| internals.settings.setTextAutosizingWindowSizeOverride(320, 480); |
| } |
| </script> |
| <style> |
| #expected { |
| font-size: 10px; |
| line-height: 1.5; |
| -webkit-text-size-adjust: 100%; |
| } |
| #tested { |
| font-size: 20px; |
| line-height: 1.5; |
| -webkit-text-size-adjust: 50%; |
| } |
| </style> |
| <script src="../../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <p id="expected">This text should have a decent spacing between the lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ante orci, posuere at aliquam eget, ornare ut sapien. Praesent commodo volutpat auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus interdum tincidunt pulvinar. Donec nec libero eros. Morbi facilisis lacus quis mi mattis quis pretium velit fringilla. Integer ipsum metus, pretium et tincidunt eget, commodo vel nibh. Cras feugiat lorem et velit interdum eu luctus dui gravida. Nullam nec gravida orci. Vestibulum quis imperdiet nibh. Vivamus tincidunt erat ac risus egestas mattis.</p> |
| <p id="tested">This text should have a decent spacing between the lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ante orci, posuere at aliquam eget, ornare ut sapien. Praesent commodo volutpat auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus interdum tincidunt pulvinar. Donec nec libero eros. Morbi facilisis lacus quis mi mattis quis pretium velit fringilla. Integer ipsum metus, pretium et tincidunt eget, commodo vel nibh. Cras feugiat lorem et velit interdum eu luctus dui gravida. Nullam nec gravida orci. Vestibulum quis imperdiet nibh. Vivamus tincidunt erat ac risus egestas mattis.</p> |
| <script> |
| description("Tests number line-height is adjusted with percentage -webkit-text-size-adjust values."); |
| var expected = document.getElementById("expected"); |
| var tested = document.getElementById("tested"); |
| expectedLineHeight = window.getComputedStyle(expected)['line-height']; |
| testedLineHeight = window.getComputedStyle(tested)['line-height']; |
| shouldBe("testedLineHeight", "expectedLineHeight"); |
| expected.remove(); |
| tested.remove(); |
| successfullyParsed = true; |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |
| </html> |