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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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