OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 This test passes if there are three green squares below:<br> | 4 This test passes if there are three green squares below:<br> |
5 <svg width="300" height="300"> | 5 <svg width="300" height="300"> |
6 <defs> | 6 <defs> |
7 <symbol id="symbol" width="100"> | 7 <symbol id="symbol" width="100"> |
8 <rect width="100%" height="100%" fill="green"/> | 8 <rect width="100%" height="100%" fill="green"/> |
9 </symbol> | 9 </symbol> |
10 </defs> | 10 </defs> |
11 <svg x="0" y="0" width="100" height="100"> | 11 <svg x="0" y="0" width="100" height="100"> |
12 <use id="use1" xlink:href="#symbol"/> | 12 <use id="use1" xlink:href="#symbol"/> |
13 </svg> | 13 </svg> |
14 <use id="use2" xlink:href="#symbol" x="100" y="100" width="10" height="100"/> | 14 <use id="use2" xlink:href="#symbol" x="100" y="100" width="10" height="100"/> |
15 <use id="use3" xlink:href="#symbol" x="200" y="200" width="100" height="10"/> | 15 <use id="use3" xlink:href="#symbol" x="200" y="200" width="100" height="10"/> |
16 </svg> | 16 </svg> |
17 <script> | 17 <script> |
18 onload = function() { | 18 onload = function() { |
19 // Wait until first layout is finished. | 19 // Wait until first layout is finished. |
20 window.requestAnimationFrame(function() { | 20 window.requestAnimationFrame(function() { |
21 document.getElementById('use2').removeAttribute('width'); | 21 document.getElementById('use2').setAttribute('width', '100'); |
22 document.getElementById('use3').setAttribute('height', '100'); | 22 document.getElementById('use3').removeAttribute('height'); |
23 }); | 23 }); |
24 } | 24 } |
25 </script> | 25 </script> |
26 </body> | 26 </body> |
27 </html> | 27 </html> |
OLD | NEW |