Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / svg / custom / invisible-text-after-scrolling.xhtml
blob9a534a48e3501a81361c0808094def080ec75718
1 <?xml version="1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
6 <script type="text/javascript" language="Javascript">
7 <![CDATA[
8 function runText()
10 for(var y=20; y<5000; y+=100)
12 for(var x=0; x<5000; x+=100)
14 var svgArea = document.getElementById("svgArea");
15 var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
16 text.setAttributeNS(null, "x", x);
17 text.setAttributeNS(null, "y", y);
18 text.setAttributeNS(null, "fill", "black");
19 text.setAttributeNS(null, "font-size", 20);
20 text.setAttributeNS(null, "text-anchor", "start");
21 text.appendChild(document.createTextNode("just a text"));
22 svgArea.appendChild(text);
25 var scrolldiv = document.getElementById("scrolldiv");
26 scrolldiv.scrollTop = 550;
28 ]]>
29 </script>
31 <title>BUG 12163: SVG text disappears in scrolling div</title>
32 </head>
33 <body onload="runText();">
34 <p>In the div below the text is distributed over the whole SVG area. But when you scroll around the invisible text does not appear (Bug 12163).</p>
35 <div style="overflow:auto; position:absolute; left:10px; width:500px; height:500px; border:1px solid #aaaaaa;" id="scrolldiv">
36 <svg id="svgArea" width = "5000" height = "5000" xmlns = "http://www.w3.org/2000/svg"></svg>
37 </div>
38 </body>
39 </html>