1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>Arabic Line breaking performance test</title> 6 <script src="../resources/runner.js"></script> 7 </head> 8 <body> 9 <!-- Example Arabic from Wikisource of One Thousand and One Nights, first two sections, 10 http://ar.wikisource.org/wiki/%D8%A3%D9%84%D9%81_%D9%84%D9%8A%D9%84%D8%A9_%D9%88%D9%84%D9%8A%D9%84%D8%A9/%D8%A7%D9%84%D8%AC%D8%B2%D8%A1_%D8%A7%D9%84%D8%A3%D9%88%D9%84 11 --> 12 <pre id="log"></pre> 13 <div id="target" style="width: 300px; display: none;" lang="ar" dir="rtl"> 14 <h2> </h2> 15 <p>.. . . : . : : . : . : : . : : : . : . : : . : . . . :</p> 16 <div style="text-align: center;"> 17 <p> </p> 18 </div> 19 <p>: : : : : : : :</p> 20 <div style="text-align: center;"> 21 <p> </p> 22 <p> </p> 23 <p> </p> 24 </div> 25 <p> : . . . .</p> 26 <p> . : :</p> 27 <div style="text-align: center;"> 28 <p> </p> 29 </div> 30 <p> : : : : : </p> 31 </div> 32 <script> 33 var target = document.getElementById("target"); 34 var style = target.style; 35 36 function test() { 37 style.display = "block"; 38 style.width = "280px"; 39 target.offsetLeft; 40 style.width = "300px"; 41 target.offsetLeft; 42 style.width = "290px"; 43 target.offsetLeft; 44 style.display = "none"; 45 } 46 47 PerfTestRunner.measureRunsPerSecond({ run: test }); 48 </script> 49 </body> 50 </html> 51