single-value.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE HTML>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/licenses/publicdomain/
  5. Test: text-overflow: <single value>, scrolled and non-scrolled tests, (bug 684266)
  6. -->
  7. <html class="reftest-wait"><head>
  8. <title>text-overflow: &lt;single value&gt;, scrolled and non-scrolled tests, (bug 684266)</title>
  9. <style type="text/css">
  10. @font-face {
  11. font-family: DejaVuSansMono;
  12. src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
  13. }
  14. html,body {
  15. color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
  16. }
  17. body {padding:10px 40px;}
  18. div {
  19. text-overflow: ellipsis;
  20. width:100px;
  21. white-space:nowrap;
  22. }
  23. .hidden {overflow:hidden}
  24. .auto {overflow:auto}
  25. .autolong {overflow:auto; width:100%;}
  26. .scroll {overflow:scroll}
  27. .ltr { direction:ltr; unicode-bidi: bidi-override; }
  28. .rtl { direction:rtl; unicode-bidi: bidi-override; }
  29. .ltr.p { text-indent: -5px; padding-left: 40px; } /* overflow into padding, but not outside the padding edge */
  30. .rtl.p { text-indent: -5px; padding-right: 40px; } /* overflow into padding, but not outside the padding edge */
  31. .s { text-indent: -5px; } /* overflow start edge outside the padding edge */
  32. </style>
  33. <script>
  34. function scrolldivs() {
  35. var divs = document.getElementsByTagName('div');
  36. for (i = 0; i < divs.length; ++i) {
  37. var elm = divs[i];
  38. if (elm.hasAttribute('scroll')) {
  39. if (window.getComputedStyle(elm).direction == 'ltr')
  40. elm.scrollLeft = 8;
  41. else
  42. elm.scrollLeft = -8;
  43. }
  44. }
  45. document.documentElement.removeAttribute('class');
  46. }
  47. window.addEventListener("MozReftestInvalidate", scrolldivs, false);
  48. </script>
  49. </head>
  50. <body>
  51. <div class="ltr start p hidden">A long line that does not break (overflow:hidden)</div>
  52. <div class="ltr start p auto">A long line that does not break (overflow:auto)</div>
  53. <div class="ltr start p autolong">A long line that does not break (overflow:auto)</div>
  54. <div class="ltr start p scroll">A long line that does not break (overflow:scroll)</div>
  55. <div class="ltr start s hidden">A long line that does not break (overflow:hidden)</div>
  56. <div class="ltr start s auto">A long line that does not break (overflow:auto)</div>
  57. <div class="ltr start s autolong">A long line that does not break (overflow:auto)</div>
  58. <div class="ltr start s scroll">A long line that does not break (overflow:scroll)</div>
  59. <div scroll class="ltr start p hidden">A long line that does not break (overflow:hidden)</div>
  60. <div scroll class="ltr start p auto">A long line that does not break (overflow:auto)</div>
  61. <div scroll class="ltr start p autolong">A long line that does not break (overflow:auto)</div>
  62. <div scroll class="ltr start p scroll">A long line that does not break (overflow:scroll)</div>
  63. <div scroll class="ltr start s hidden">A long line that does not break (overflow:hidden)</div>
  64. <div scroll class="ltr start s auto">A long line that does not break (overflow:auto)</div>
  65. <div scroll class="ltr start s autolong">A long line that does not break (overflow:auto)</div>
  66. <div scroll class="ltr start s scroll">A long line that does not break (overflow:scroll)</div>
  67. <div class="rtl" style="float:right">
  68. <div class="rtl start p hidden">A long line that does not break (overflow:hidden)</div>
  69. <div class="rtl start p auto">A long line that does not break (overflow:auto)</div>
  70. <div class="rtl start p autolong">A long line that does not break (overflow:auto)</div>
  71. <div class="rtl start p scroll">A long line that does not break (overflow:scroll)</div>
  72. <div class="rtl start s hidden">A long line that does not break (overflow:hidden)</div>
  73. <div class="rtl start s auto">A long line that does not break (overflow:auto)</div>
  74. <div class="rtl start s autolong">A long line that does not break (overflow:auto)</div>
  75. <div class="rtl start s scroll">A long line that does not break (overflow:scroll)</div>
  76. <div scroll class="rtl start p hidden">A long line that does not break (overflow:hidden)</div>
  77. <div scroll class="rtl start p auto">A long line that does not break (overflow:auto)</div>
  78. <div scroll class="rtl start p autolong">A long line that does not break (overflow:auto)</div>
  79. <div scroll class="rtl start p scroll">A long line that does not break (overflow:scroll)</div>
  80. <div scroll class="rtl start s hidden">A long line that does not break (overflow:hidden)</div>
  81. <div scroll class="rtl start s auto">A long line that does not break (overflow:auto)</div>
  82. <div scroll class="rtl start s autolong">A long line that does not break (overflow:auto)</div>
  83. <div scroll class="rtl start s scroll">A long line that does not break (overflow:scroll)</div>
  84. </div>
  85. </body>
  86. </hml>