summaryrefslogtreecommitdiffstats
path: root/layout/reftests/text-overflow/marker-basic.html
blob: 4f4afb667cf070d71e978db6a640dc2f73fe22d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE HTML>
<!--
    Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/licenses/publicdomain/

    Test: basic marker position tests
-->
<html><head>
    <title>text-overflow: basic marker position tests</title>
    <style type="text/css">
@font-face {
  font-family: DejaVuSansMono;
  src: url(../fonts/DejaVuSansMono.woff);
}
html,body {
    color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
}

.rtl {
  direction:rtl;
}
.ltr {
  direction:ltr;
}
.rlo {
  unicode-bidi: bidi-override; direction: rtl;
}
.lro {
  unicode-bidi: bidi-override; direction: ltr;
}

.o {
  text-overflow: ellipsis ellipsis;
}

.rel {
  position: relative;
  height:2em;
}
.abs0 {
  position: absolute;
  top:0; left:0;
}

.s {
  width:4em;
}
.p {
  overflow: hidden;
  white-space:nowrap;
  font-size:16px;
}
.auto {
  overflow: auto;
}
.r {
  text-align:right;
}
.a {
  font-size:20px;
}
.l {
  text-align:left;
}
i {
  display:inline-block;
  width: 1.5em;
  height: 1em;
  font-style:normal;
  color:lime;
  border: 1px solid magenta;
  text-decoration:overline;
}

.c {
  margin-left:-1em;
  margin-right:-1em;
  color: black;
}
.c5 {
  margin-left:-0.5em;
  margin-right:-0.5em;
  color: black;
}
.outside {
 width:1px; height:1px;
}
.overlap1 {
 width:1.5em; height:1px;
}
.ins1 {
 width:1em; height:1px;
 margin: 0 0.8em;
}
.overlap2 {
 width:1000px; height:1px;
}
.e { padding: 0 0.8em; }


#test1a  { top:0;     left:0;     position:absolute; }
#test1b  { top:0;     left:100px; position:absolute; }
#test1c  { top:0;     left:200px; position:absolute; }
#test1d  { top:0;     left:300px; position:absolute; }
#test2a  { top:40px;  left:0;     position:absolute; }
#test2b  { top:40px;  left:100px; position:absolute; }
#test2c  { top:40px;  left:200px; position:absolute; }
#test2d  { top:40px;  left:300px; position:absolute; }
#test3a  { top:80px; left:0;     position:absolute; }
#test3b  { top:80px; left:100px; position:absolute; }
#test3c  { top:80px; left:200px; position:absolute; }
#test3d  { top:80px; left:300px; position:absolute; }
#test4a  { top:120px; left:0;     position:absolute; }
#test4b  { top:120px; left:100px; position:absolute; }
#test4c  { top:120px; left:200px; position:absolute; }
#test4d  { top:120px; left:300px; position:absolute; }
#test5a  { top:160px; left:0;     position:absolute; }
#test5b  { top:160px; left:100px; position:absolute; }
#test5c  { top:160px; left:200px; position:absolute; }
#test5d  { top:160px; left:300px; position:absolute; }
#test6a  { top:200px; left:0;     position:absolute; }
#test6b  { top:200px; left:100px; position:absolute; }
#test6c  { top:200px; left:200px; position:absolute; }
#test6d  { top:200px; left:300px; position:absolute; }
#test7a  { top:240px; left:0;     position:absolute; }
#test7b  { top:240px; left:100px; position:absolute; }
#test7c  { top:240px; left:200px; position:absolute; }
#test7d  { top:240px; left:300px; position:absolute; }
#test8a  { top:280px; left:0;     position:absolute; }
#test8b  { top:280px; left:100px; position:absolute; }
#test8c  { top:280px; left:200px; position:absolute; }
#test8d  { top:280px; left:300px; position:absolute; }
#test9a  { top:320px; left:0;     position:absolute; border:1px solid black; }
#test9b  { top:320px; left:100px; position:absolute; border:1px solid black; }
#test9c  { top:320px; left:200px; position:absolute; border:1px solid black; }
#test9d  { top:320px; left:300px; position:absolute; border:1px solid black; }
#test10a { top:360px; left:0;     position:absolute; }
#test10b { top:360px; left:100px; position:absolute; }


    </style>
</head>
<body>
<div style="position: absolute; top:20px; left:50px;">

<!-- start + end marker, aligned to text -->
<div id="test1a"><div class="s a ltr"><div class="p o"><span class="c a lro">||||||||||</span></div></div></div>
<div id="test1b"><div class="s a rtl"><div class="p o"><span class="c a lro">||||||||||</span></div></div></div>
<div id="test1c"><div class="s a ltr"><div class="p o"><span class="c a rlo">||||||||||</span></div></div></div>
<div id="test1d"><div class="s a rtl"><div class="p o"><span class="c a rlo">||||||||||</span></div></div></div>

<!-- start marker, text outside marker edge, nothing to align with -->
<div id="test2a"><div class="s a"><div class="p o ltr"><span class="c a">x</span></div></div></div>
<div id="test2b"><div class="s a"><div class="p o rtl l"><span class="c a">x</span></div></div></div>
<div id="test2c"><div class="s a"><div class="p o ltr r"><span class="c a">x</span></div></div></div>
<div id="test2d"><div class="s a"><div class="p o rtl"><span class="c a">x</span></div></div></div>

<!-- start marker, image outside marker edge, nothing to align with -->
<div id="test3a"><div class="s a"><div class="p o ltr"><span class="c a"><img class="outside" src="../image/big.png"></span></div></div></div>
<div id="test3b"><div class="s a"><div class="p o rtl l"><span class="c a"><img class="outside" src="../image/big.png"></span></div></div></div>
<div id="test3c"><div class="s a"><div class="p o ltr r"><span class="c a"><img class="outside" src="../image/big.png"></span></div></div></div>
<div id="test3d"><div class="s a"><div class="p o rtl"><span class="c a"><img class="outside" src="../image/big.png"></span></div></div></div>

<!-- start marker, marker partly overlaps image, nothing to align with -->
<div id="test4a"><div class="s a"><div class="p o ltr"><span class="c a"><img class="overlap1" src="../image/big.png"></span></div></div></div>
<div id="test4b"><div class="s a"><div class="p o rtl l"><span class="c a"><img class="overlap1" src="../image/big.png"></span></div></div></div>
<div id="test4c"><div class="s a"><div class="p o ltr r"><span class="c a"><img class="overlap1" src="../image/big.png"></span></div></div></div>
<div id="test4d"><div class="s a"><div class="p o rtl"><span class="c a"><img class="overlap1" src="../image/big.png"></span></div></div></div>

<!-- start marker + end, marker partly overlaps image, nothing to align with -->
<div id="test5a"><div class="s a"><div class="p o ltr"><span class="c a"><img class="overlap2" src="../image/big.png"></span></div></div></div>
<div id="test5b"><div class="s a"><div class="p o rtl l"><span class="c a"><img class="overlap2" src="../image/big.png"></span></div></div></div>
<div id="test5c"><div class="s a"><div class="p o ltr r"><span class="c a"><img class="overlap2" src="../image/big.png"></span></div></div></div>
<div id="test5d"><div class="s a"><div class="p o rtl"><span class="c a"><img class="overlap2" src="../image/big.png"></span></div></div></div>

<!-- start marker, marker clips text, aligns to image -->
<div id="test6a"><div class="s a"><div class="p o ltr"><span class="c a">|||<img class="overlap1" src="../image/big.png"></span></div></div></div>
<div id="test6b"><div class="s a"><div class="p o rtl l"><span class="c a"><img class="overlap1" src="../image/big.png">|||</span></div></div></div>
<div id="test6c"><div class="s a"><div class="p o ltr r"><span class="c a"><img class="overlap1" src="../image/big.png">|||</span></div></div></div>
<div id="test6d"><div class="s a"><div class="p o rtl"><span class="c a">|||<img class="overlap1" src="../image/big.png"></span></div></div></div>

<!-- start marker, marker aligns to image -->
<div id="test7a"><div class="s a"><div class="p o ltr"><span class="c5 a">|<img class="ins1" src="../image/big.png"></span></div></div></div>
<div id="test7b"><div class="s a"><div class="p o rtl"><span class="c5 a">|<img class="ins1" src="../image/big.png"></span></div></div></div>
<!-- end marker, marker aligns to image -->
<div id="test7c"><div class="s a"><div class="p o rtl l"><span class="c5 a"><img class="ins1" src="../image/big.png">|</span></div></div></div>
<div id="test7d"><div class="s a"><div class="p o ltr r"><span class="c5 a"><img class="ins1" src="../image/big.png">|</span></div></div></div>

<!-- start marker, marker aligns to empty element -->
<div id="test8a"><div class="s a"><div class="a p o ltr"><span class="c5 a">|</span><span class="e"></span><span>&#x200c;</span></div></div></div>
<div id="test8d"><div class="s a"><div class="a p o rtl"><span class="c5 a">|</span><span class="e"></span><span>&#x200c;</span></div></div></div>

<!-- end marker, marker aligns to inline block with overflow -->
<div id="test9a"><div class="s a"><div class="p o ltr"><span class="e"></span><i>&nbsp;&nbsp;&nbsp;&nbsp;</i><span class="e"></span><span class="c5 a">|||</span></div></div></div>
<div id="test9b"><div class="s a"><div class="p o rtl"><span class="e"></span><i>&nbsp;&nbsp;&nbsp;&nbsp;</i><span class="e"></span><span class="c5 a">|||</span></div></div></div>
<div id="test9c"><div class="s a"><div class="p o ltr"><span class="e"></span><i>&nbsp;&nbsp;&nbsp;&nbsp;</i><span class="e"></span><span class="c5 a">|||</span></div></div></div>
<div id="test9d"><div class="s a"><div class="p o rtl"><span class="e"></span><i>&nbsp;&nbsp;&nbsp;&nbsp;</i><span class="e"></span><span class="c5 a">|||</span></div></div></div>

<!-- no marker for overflow:auto that doesn't trigger scrollbar -->
<div id="test10a"><div class="s a"><div class="p o ltr auto"><span style="margin-left:-5px" >||||||</span></div></div></div>
<div id="test10b"><div class="s a"><div class="p o rtl auto"><span style="margin-right:-5px">||||||</span></div></div></div>

</div>
</body>
</html>