Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / PerformanceTests / Layout / system-ui.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../resources/runner.js"></script>
6 </head>
7 <body>
8 <div id="target" style="width: 300px; display: none; font: 42px 'system-ui', '-apple-system';" lang="zh-CN"></div>
9 <script>
10 var target = document.getElementById("target");
11 var style = target.style;
12
13 var s = "";
14 var length = 10000;
15 var startCode = 0x4E00;
16 for (var i = 0; i < length; ++i) {
17     s = s + String.fromCharCode(i + startCode);
18 }
19
20
21 function test() {
22     if (window.internals)
23         window.internals.invalidateFontCache();
24
25     style.display = "block";
26     target.offsetLeft;
27     target.textContent = s;
28     target.offsetLeft;
29     target.textContent = "";
30     style.display = "none";
31 }
32
33 PerfTestRunner.measureRunsPerSecond({ run: test });
34 </script>
35 </body>
36 </html>