Home | History | Annotate | Download | only in Layout
      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4     <title>Hindi Line breaking performance test</title>
      5     <script src="../resources/runner.js"></script>
      6 </head>
      7 <body>
      8     <!-- Example hindi from http://people.w3.org/rishida/scripts/samples/hindi.php. Hindi was chosen, as its ligatures should cause us to use the complex-text path. -->
      9     <pre id="log"></pre>
     10     <div id="target" style="width: 300px; display: none;">
     11         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     12         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     13         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     14         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     15         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     16         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     17         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     18         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     19         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     20         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     21         <p lang="hi" xml:lang="hi" title="This is Hindi"><span id="e8" class="ex"></span>         <span id="e9" class="ex"></span> <span id="e3" class="ex"></span>,                 <span id="e10" class="ex"></span>  <span id="e4" class="ex"></span>       <span id="e1" class="ex"></span>             <span id="e2" class="ex"></span>   ''         <span id="e6" class="ex"></span>     <span id="e7" class="ex"></span>      </p>
     22     </div>
     23     <script>
     24         var target = document.getElementById("target");
     25         var style = target.style;
     26 
     27         function test() {
     28             style.display = "block";
     29             style.width = "280px";
     30             target.offsetLeft;
     31             style.width = "300px";
     32             target.offsetLeft;
     33             style.width = "290px";
     34             target.offsetLeft;
     35             style.display = "none";
     36         }
     37 
     38         PerfTestRunner.measureRunsPerSecond({ run: test });
     39     </script>
     40 </body>
     41 </html>
     42