Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / Websites / browserbench.org / index.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5     <title>BrowserBench.org &mdash; Browser Benchmarks</title>
6     <link rel="stylesheet" href="resources/main.css">
7     <script>
8     function chooseAsset(img) {
9         var ratio = window.devicePixelRatio;
10         var srcset = img.getAttribute('srcset');
11         if (!srcset)
12             return null;
13         var tokens = srcset.split(/\s*,\s*/);
14         for (var i = 0; i < tokens.length; i++) {
15             var parsedToken = tokens[i].match(/(.+)\s+(\d)x/);
16             if (parsedToken && parseInt(parsedToken[2]) == ratio)
17                 return parsedToken[1];
18         }
19         return null;
20     }
21
22     if (!HTMLImageElement.prototype.srcset) {
23         window.addEventListener('DOMContentLoaded', function () {
24             var images = document.querySelectorAll('img');
25             for (var i = 0; i < images.length; i++) {
26                 if (!images[i].srcset)
27                     images[i].src = chooseAsset(images[i]);
28             }
29         });
30     }
31     </script>
32 </head>
33 <body>
34 <main>
35
36 <div id="logo">
37 <span class="light">browser</span><span class="normal">bench</span><span class="highlight">.</span><span class="light">org</span>
38 </div>
39
40 <hr>
41
42 <section class="benchmarks">
43
44 <a class="benchmark" href="JetStream" tabindex="0">
45 <img id="jetstream-logo"
46     srcset="resources/JetStream2-Logo.png 1x, resources/JetStream2-Logo@2x.png 2x" alt="JetStream2">
47 <p>JetStream 2 is a JavaScript and WebAssembly benchmark suite focused on advanced web applications.</p>
48 </a>
49
50 <a class="benchmark" href="MotionMark1.1" tabindex="0">
51 <img id="motionmark-logo" srcset="resources/MotionMark-Logo.png 1x, resources/MotionMark-Logo@2x.png 2x" alt="MotionMark">
52 <p>MotionMark is a benchmark designed to put browser graphics systems to the test.</p>
53 </a>
54
55 <a class="benchmark" href="Speedometer2.0" tabindex="0">
56 <img id="speedometer-logo"
57     srcset="resources/Speedometer-Logo.png 1x, resources/Speedometer-Logo@2x.png 2x" alt="Speedometer">
58 <p>Speedometer is a browser benchmark that measures the responsiveness of web applications.</p>
59 </a>
60
61 </section>
62 </main>
63 </body>
64 </html>