tor-browser

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

struct-dom-14-f-isvalid.html (4123B)


      1 <!DOCTYPE html>
      2 <html lang='en'>
      3 <head>
      4 <title>struct-dom-14-f-manual.svg</title>
      5 <meta charset='utf-8'>
      6 </head>
      7 <body>
      8 <h1>Source SVG: struct-dom-14-f-manual.svg</h1>
      9 <svg id="svg-root" width="100%" height="100%"
     10  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
     11  xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()">
     12  <!--======================================================================-->
     13  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
     14  <!--=  Institute of Technology, European Research Consortium for         =-->
     15  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
     16  <!--=  All Rights Reserved.                                              =-->
     17  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
     18  <!--======================================================================-->
     19  
     20  <title id="test-title">$RCSfile: struct-dom-14-f.svg,v $</title>
     21  <defs>
     22    <font-face
     23      font-family="SVGFreeSansASCII"
     24      unicode-range="U+0-7F">
     25      <font-face-src>
     26        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
     27      </font-face-src>
     28    </font-face>
     29  </defs>
     30  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
     31 
     32    <defs>
     33      <g id="defsg1">
     34        <circle id="defscircle3" cx="80" cy="180" r="25"/>
     35        <circle id="defscircle4" cx="1000" cy="180" r="25"/>
     36        <use xlink:href="#defscircle4" transform="translate(-600, 0)"/>
     37      </g>
     38      <script>
     39        <![CDATA[
     40        function runTest()
     41        {
     42          try 
     43          {
     44            var use = document.getElementById("use1");
     45            var instanceroot = use.instanceRoot;
     46            
     47            if (instanceroot.firstChild.correspondingElement !== instanceroot.childNodes.item(0).correspondingElement)
     48              throw("failed");
     49            if (instanceroot.firstChild.nextSibling.correspondingElement !== instanceroot.childNodes.item(1).correspondingElement)
     50              throw("failed");
     51            if (instanceroot.lastChild.correspondingElement !== instanceroot.childNodes.item(instanceroot.childNodes.length-1).correspondingElement)
     52              throw("failed");
     53 
     54            // indicate test passed
     55            document.getElementById("status").setAttribute("fill", "lime");
     56              
     57            // This is an optional part of the test, which indicates whether SVGElementInstance(List) follows the normal DOM NodeList conventions and 
     58            // whether the returned objects are actually the same objects as those that the SVGElementInstance traversal attributes return.
     59            if (instanceroot.firstChild !== instanceroot.childNodes.item(0))
     60              throw("failed");
     61            if (instanceroot.firstChild.nextSibling !== instanceroot.childNodes.item(1))
     62              throw("failed");
     63            if (instanceroot.lastChild !== instanceroot.childNodes.item(instanceroot.childNodes.length-1))
     64              throw("failed");
     65            
     66            // indicate status of the optional part of the test 
     67            document.getElementById("optional").setAttribute("fill", "green");
     68          }
     69          catch(e)
     70          {
     71          }
     72        }
     73      ]]>
     74      </script>
     75    </defs>
     76 
     77    <use id="use1" xlink:href="#defsg1"/>
     78 
     79    <rect id="status" width="100%" height="100%" fill="red"/>
     80    <circle id="optional" cx="50%" cy="50%" r="10%" fill="yellow"/>
     81 
     82  </g>
     83  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
     84    <text id="revision" x="10" y="340" stroke="none"
     85      fill="black">$Revision: 1.4 $</text>
     86  </g>
     87  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
     88  <!-- comment out this watermark once the test is approved -->
     89  <!--g id="draft-watermark">
     90    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
     91    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
     92      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
     93  </g-->
     94 </svg>
     95 </body>
     96 </html>