layout/reftests/box-properties/CSS21-t100303-make-images.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.)

michael@0 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
michael@0 2 "http://www.w3.org/TR/html4/strict.dtd">
michael@0 3 <html lang="en-US">
michael@0 4 <head>
michael@0 5 <title></title>
michael@0 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
michael@0 7 <meta http-equiv="Content-Script-Type" content="text/javascript">
michael@0 8 <script type="text/javascript">
michael@0 9
michael@0 10 var gWidth = 1024;
michael@0 11 var gHeight = 1;
michael@0 12 var gBarriers = [ 170, 334, 340, 344, 350, 458 ];
michael@0 13
michael@0 14 var gColors = [ "green", "red" ];
michael@0 15
michael@0 16 function append_url(filename, contents_url) {
michael@0 17 var p = document.createElement("p");
michael@0 18 var a = document.createElement("a");
michael@0 19 a.href = contents_url;
michael@0 20 var t = document.createTextNode("CSS21-t100303-" + filename);
michael@0 21 a.appendChild(t);
michael@0 22 p.appendChild(a);
michael@0 23 document.body.appendChild(p);
michael@0 24 }
michael@0 25
michael@0 26 function run() {
michael@0 27 var canvas = document.getElementById("canvas");
michael@0 28 var cx = canvas.getContext("2d");
michael@0 29 for (var i in gBarriers) {
michael@0 30 var barrier = gBarriers[i];
michael@0 31
michael@0 32 cx.fillStyle = gColors[1];
michael@0 33 cx.fillRect(0, 0, gWidth, gHeight);
michael@0 34 cx.fillStyle = gColors[0];
michael@0 35 cx.fillRect(0, 0, barrier, gHeight);
michael@0 36 append_url(gColors[0] + "-in-" + barrier + "px.png",
michael@0 37 canvas.toDataURL("image/png"));
michael@0 38
michael@0 39 cx.fillStyle = gColors[0];
michael@0 40 cx.fillRect(0, 0, gWidth, gHeight);
michael@0 41 cx.fillStyle = gColors[1];
michael@0 42 cx.fillRect(0, 0, barrier, gHeight);
michael@0 43 append_url(gColors[0] + "-outside-" + barrier + "px.png",
michael@0 44 canvas.toDataURL("image/png"));
michael@0 45 }
michael@0 46 }
michael@0 47
michael@0 48 </script>
michael@0 49 </head>
michael@0 50 <body onload="run()">
michael@0 51
michael@0 52 <canvas width="1024" height="1" id="canvas"></canvas>
michael@0 53
michael@0 54 </body>
michael@0 55 </html>

mercurial