content/canvas/test/reftest/drawCustomFocusRing.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/canvas/test/reftest/drawCustomFocusRing.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +<!--docytpe html-->
     1.5 +<html><head>
     1.6 +<meta http-equiv="content-type" content="text/html; charset=UTF-8">
     1.7 +<meta charset="UTF-8">
     1.8 +<script>
     1.9 +window.onload=function(){
    1.10 +var c=document.getElementById("myCanvas").getContext("2d");
    1.11 +var in1=document.getElementById("in1");
    1.12 +var in2=document.getElementById("in2");
    1.13 +in1.onfocus=function(){
    1.14 +c.beginPath();
    1.15 +c.rect(10, 10, 200, 200);
    1.16 +if(c.drawCustomFocusRing(in1)) {
    1.17 +   c.stroke();
    1.18 +}
    1.19 +c.beginPath();
    1.20 +c.rect(10, 220, 200, 200);
    1.21 +if(c.drawCustomFocusRing(in2)) {
    1.22 +   c.stroke();
    1.23 +}
    1.24 +}
    1.25 +in1.focus();
    1.26 +}
    1.27 +</script>
    1.28 +</head>
    1.29 +<body>
    1.30 +<canvas id="myCanvas" height="500" width="500" style="border:1px solid black">
    1.31 +   <input id="in1" type="range" min="1" max="12">
    1.32 +   <input id="in2" type="range" min="1" max="12">
    1.33 +</canvas>
    1.34 +
    1.35 +</body></html>

mercurial