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