Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / text / text-rescale.html
blob889b05668bed6031db2c45cfcd5e4d8e7fa99a70
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <!-- Test that a script can change the scale of text from very small to something visible -->
4 <!-- see: https://bugs.webkit.org/show_bug.cgi?id=75091 -->
5 <!-- If this test passes there should be 3 rows and 4 columns of "PASS" -->
6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
7 </head>
8 <body onload="runRepaintAndPixelTest()">
9 <svg style="position: absolute; top: 0px; left: 0px; width: 500px; height: 200px">
10 <g id="text1g" transform="scale(0.001)">
11 <text x="0" y="50" font-size="40" fill="#080">
12 PASS
13 <tspan fill="#080"> PASS</tspan>
14 </text>
15 <foreignObject x="210" y="13" width="100" height="100">
16 <body><p style="font-size: 40px; color: #080;">PASS</p></body>
17 </foreignObject>
18 <svg x="310" y="13" width="100" height="100">
19 <text x="0" y="37" font-size="40" fill="#080">PASS</text>
20 </svg>
21 </g>
22 <g id="text2g" transform="scale(1)">
23 <text x="0" y="100" font-size="40" fill="#080">
24 PASS
25 <tspan fill="#080"> PASS</tspan>
26 </text>
27 <foreignObject x="210" y="63" width="100" height="100">
28 <body><p style="font-size: 40px; color: #080;">PASS</p></body>
29 </foreignObject>
30 <svg x="310" y="63" width="100" height="100">
31 <text x="0" y="37" font-size="40" fill="#080">PASS</text>
32 </svg>
33 </g>
34 <g id="text3g" transform="scale(0.03)">
35 <text x="0" y="150" font-size="40" fill="#080">
36 PASS
37 <tspan fill="#080"> PASS</tspan>
38 </text>
39 <foreignObject x="210" y="113" width="100" height="100">
40 <body><p style="font-size: 40px; color: #080;">PASS</p></body>
41 </foreignObject>
42 <svg x="310" y="113" width="100" height="100">
43 <text x="0" y="37" font-size="40" fill="#080">PASS</text>
44 </svg>
45 </g>
46 </svg>
47 <script>
48 function repaintTest() {
49 document.getElementById("text1g").setAttribute('transform', 'scale(1)');
50 document.getElementById("text2g").setAttribute('transform', 'scale(1)');
51 document.getElementById("text3g").setAttribute('transform', 'scale(1)');
53 </script>
54 </body>
55 </html>