tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

insert-block-in-blocks-n-inlines-begin-003.xht (2383B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      2 
      3 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
      4 
      5  <head>
      6 
      7   <title>CSS Test: Insert a block-level element	into an element that contains both blocks and inlines and directly into the block-of-blocks (and not into any anonymous block-of-inlines)	at the beginning of the block-of-blocks</title>
      8 
      9   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
     10   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level" title="9.2.1.1 Anonymous block boxes" />
     11   <link rel="match" href="insert-block-in-blocks-n-inlines-begin-003-ref.xht" />
     12 
     13   <meta http-equiv="Content-Script-Type" content="text/javascript" />
     14   <meta content="ahem dom" name="flags" />
     15 
     16   <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     17   <style type="text/css"><![CDATA[
     18   div.container
     19   {
     20   background-color: fuchsia;
     21   color: black;
     22   font: 20px/1 Ahem;
     23   margin: 1em;
     24   }
     25 
     26   div > div {margin: 1em 0em;}
     27 
     28   div.inserted
     29   {
     30   border-left: yellow solid 0.5em;
     31   border-right: yellow solid 0.5em;
     32   }
     33   ]]></style>
     34 
     35   <script type="text/javascript"><![CDATA[
     36   function insertABlockAtBeginning()
     37   {
     38   document.body.offsetHeight;
     39 
     40   var newBlockNode = document.createElement("div");
     41 
     42   newBlockNode.className = "inserted";
     43 
     44   newBlockNode.appendChild(document.createTextNode("Inserted new block"));
     45 
     46   document.getElementsByClassName("container")[0].insertBefore(newBlockNode, document.getElementById("insertion-point"));
     47 
     48   document.documentElement.className = "";
     49   }
     50   ]]></script>
     51 
     52  </head>
     53 
     54  <body onload="insertABlockAtBeginning();">
     55 
     56   <p>Test passes if the 2 colorized rectangles are <strong>identical</strong>.</p>
     57 
     58   <div class="container"><div>1stBlock</div>
     59   <div>ScndBlock</div><span id="insertion-point">1stInline</span><div>FourthBlock</div>
     60   <div>Fifth55Block</div><span>SecondInline</span><div>Seven777Block</div>
     61   <div>Eight8888Block</div></div>
     62 
     63   <div class="container">
     64     <div>1stBlock</div>
     65     <div>ScndBlock</div>
     66     <div class="inserted">Inserted new block</div>
     67     <span>1stInline</span>
     68     <div>FourthBlock</div>
     69     <div>Fifth55Block</div>
     70     <span>SecondInline</span>
     71     <div>Seven777Block</div>
     72     <div>Eight8888Block</div>
     73   </div>
     74 
     75  </body>
     76 </html>