Thu, 15 Jan 2015 21:03:48 +0100
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 class="reftest-wait">
3 <head>
4 <meta charset="UTF-8">
6 <script type="text/javascript" src="webgl-utils.js"></script>
7 <script type="text/javascript">
8 /* Resize Test
9 *
10 * Create canvas of wrong size.
11 * Clear the canvas to red.
12 * Resize to correct size.
13 * Clear to green.
14 */
16 "use strict";
18 function render(gl) {
19 gl.clearColor(1.0, 0.0, 0.0, 1.0);
20 gl.clear(gl.COLOR_BUFFER_BIT);
22 gl.canvas.width = 256;
23 gl.canvas.height = 256;
24 gl.clearColor(0.0, 1.0, 0.0, 1.0);
25 gl.clear(gl.COLOR_BUFFER_BIT);
27 gl.finish();
28 }
30 function renderFailure(canvas) {
31 // This will also trigger RAF for us.
32 var context = canvas.getContext("2d");
33 context.fillText('WebGL failed.', 64, 64);
34 }
36 function runTest() {
37 var canvas = document.getElementById("canvas");
39 var gl = initGL(canvas);
40 if (gl)
41 render(gl);
42 else
43 renderFailure(canvas);
45 waitForComposite(testComplete);
46 }
48 function testComplete() {
49 document.documentElement.removeAttribute("class");
50 }
51 </script>
52 </head>
54 <body onload="rAF(runTest);">
55 <canvas id="canvas" width="128" height="128" bgcolor='yellow'></canvas>
56 </body>
58 </html>