Skip to content

Commit b749ca8

Browse files
committed
[css-ui-3] Add test text-overflow and pointer event interaction
This is to reflect the spec change introduced by w3c/csswg-drafts#1637
1 parent ffb718b commit b749ca8

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

css/css-ui-3/text-overflow-023.html

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<htmlclass="reftest-wait">
3+
<metacharset="utf-8">
4+
<title>CSS Basic User Interface Test: interacting with the ellipsis</title>
5+
<linkrel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
6+
<linkrel="help" href="http://www.w3.org/TR/css3-ui/#text-overflow">
7+
<linkrel="match" href="../reference/ref-filled-green-100px-square.xht">
8+
<metaname="flags" content="ahem interact dom should">
9+
<metaname="assert" content="Pointer events on the ellipsis should be dispatched to the elided inline element if there's one, rather than directly to the block.">
10+
<style>
11+
#test {
12+
overflow: hidden;
13+
text-overflow: ellipsis;
14+
margin-left:-100px;
15+
width:2.5em;
16+
height:1em;
17+
white-space: pre;
18+
font:100px/1 ahem;
19+
color: blue;
20+
}
21+
#discard {
22+
float: left;
23+
}
24+
</style>
25+
26+
<divid=discard>First, click the blue box. </div>
27+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
28+
<divid="test"><spanid="inner"></span></div>
29+
<script>
30+
document.getElementById("test").addEventListener("click",red);
31+
document.getElementById("inner").addEventListener("click",green)
32+
functionred(){
33+
document.getElementById("test").style.color="red";
34+
document.getElementById("discard").remove();
35+
document.children[0].className="";
36+
}
37+
functiongreen(e){
38+
document.getElementById("test").style.color="green";
39+
document.getElementById("discard").remove();
40+
document.children[0].className="";
41+
e.stopPropagation();
42+
}
43+
</script>

0 commit comments

Comments
 (0)
close