| <!DOCTYPE html> |
| <html> |
| <body> |
| <head> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| </script> |
| <style> |
| svg { |
| height: 0; |
| width: 0; |
| } |
| </style> |
| </head> |
| <p>This tests that we don't cause an assertion failure when re-parenting a <mpath> after temporarily removing its referenced element.</p> |
| <svg> |
| <circle id="a"></circle> |
| <mpath xlink:href="#a" id="b"></mpath> |
| </svg> |
| <div id="c"></div> |
| <div id="a"></div> |
| <script> |
| var a = document.getElementById("a"); // <circle> |
| var b = document.getElementById("b"); // <mpath> |
| a.parentNode.removeChild(a); |
| b.appendChild(a); |
| b.parentNode.removeChild(b); |
| document.getElementById("c").appendChild(b); |
| </script> |
| <p>PASS</p> |
| </body> |
| </html> |