<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>DOM CSS Rule Rematching: inserting elements</title>
  <style type="text/css">
  <![CDATA[
   div { position: relative; background: red; color: yellow; width: 10em; }
   p { margin: 0; }
   p * { position: absolute; top: 0; left: 0; background: green; color: white; width: 10em; }
  ]]>
  </style>
  <script type="text/javascript">
  <![CDATA[
    function test() {
      var span = document.createElementNS('http://www.w3.org/1999/xhtml', 'span');
      span.appendChild(document.createTextNode('PASS'));
      document.getElementById('test').appendChild(span);
    }
  ]]>
  </script>
 </head>
 <body onload="window.setTimeout(test, 300)">
  <div><p>FAIL</p><p id="test"></p></div>
 </body>
</html>
