content/canvas/test/webgl-conformance/extra/offscreen-issue.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4 <meta charset="utf-8">
     5 <script type="text/javascript">
     7 window.onload = function() {
     8   setup("1");
     9   setup("2");
    10 }
    12 function setup(id) {
    13   var c = document.getElementById(id);
    14   var names = ["webgl", "experimental-webgl"];
    15   for (var i = 0; i < names.length; ++i) {
    16     gl = canvas.getContext(names[i]);
    17     if (gl) {
    18       break;
    19     }
    20   }
    21   gl.clearColor(1,0,0,1);
    22   gl.clear(gl.COLOR_BUFFER_BIT);
    23   setTimeout(function() {
    24     gl.enable(gl.SCISSOR_TEST);
    25     gl.scissor(0,0,50,50);
    26     gl.clearColor(0,1,0,1);
    27     gl.clear(gl.COLOR_BUFFER_BIT);
    28   }, 500);
    29 }
    30 </script>
    31 </head>
    32 <body>
    33 <canvas id="1"></canvas>
    34 <div style="height:4000px;">content that is tall like several articles</div>
    35 <canvas id="2"></canvas>
    36 </body>
    37 </html>

mercurial