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.)
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <script> |
michael@0 | 5 | |
michael@0 | 6 | function boom() |
michael@0 | 7 | { |
michael@0 | 8 | var canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); |
michael@0 | 9 | var ctx = canvas.getContext("2d"); |
michael@0 | 10 | document.implementation.createDocument("", "", null).adoptNode(canvas); |
michael@0 | 11 | |
michael@0 | 12 | try { ctx.save(); } catch(e){} |
michael@0 | 13 | try { ctx.restore(); } catch(e){} |
michael@0 | 14 | try { ctx.scale(0,0); } catch(e){} |
michael@0 | 15 | try { ctx.rotate(90); } catch(e){} |
michael@0 | 16 | try { ctx.translate(1,1); } catch(e){} |
michael@0 | 17 | try { ctx.transform(0,100,200,300,10,10); } catch(e){} |
michael@0 | 18 | try { ctx.setTransform(0,100,200,300,10,10); } catch(e){} |
michael@0 | 19 | |
michael@0 | 20 | try { x = ctx.globalAlpha; } catch(e){} |
michael@0 | 21 | try { ctx.globalAlpha = 0.8; } catch(e){} |
michael@0 | 22 | try { x = ctx.globalCompositeOperation; } catch(e){} |
michael@0 | 23 | try { ctx.globalCompositeOperation = "copy"; } catch(e){} |
michael@0 | 24 | try { x = ctx.strokeStyle; } catch(e){} |
michael@0 | 25 | try { ctx.strokeStyle = "red"; } catch(e){} |
michael@0 | 26 | try { x = ctx.fillStyle; } catch(e){} |
michael@0 | 27 | try { ctx.fillStyle = "red"; } catch(e){} |
michael@0 | 28 | |
michael@0 | 29 | try { ctx.createLinearGradient(0,100,100,100); } catch(e){} |
michael@0 | 30 | try { ctx.createRadialGradient(0,100,100,100,10,10); } catch(e){} |
michael@0 | 31 | try { ctx.createPattern(document.getElementsByTagName('img')[0], "repeat"); } catch(e){} |
michael@0 | 32 | |
michael@0 | 33 | try { x = ctx.lineWidth; } catch(e){} |
michael@0 | 34 | try { ctx.lineWidth = 2; } catch(e){} |
michael@0 | 35 | try { x = ctx.lineCap; } catch(e){} |
michael@0 | 36 | try { ctx.lineCap = "round"; } catch(e){} |
michael@0 | 37 | try { x = ctx.lineJoin; } catch(e){} |
michael@0 | 38 | try { ctx.lineJoin = "bevel"; } catch(e){} |
michael@0 | 39 | try { x = ctx.miterLimit; } catch(e){} |
michael@0 | 40 | try { ctx.miterLimit = 12; } catch(e){} |
michael@0 | 41 | |
michael@0 | 42 | try { x = ctx.shadowOffsetX; } catch(e){} |
michael@0 | 43 | try { ctx.shadowOffsetX = 1; } catch(e){} |
michael@0 | 44 | try { x = ctx.shadowOffsetY; } catch(e){} |
michael@0 | 45 | try { ctx.shadowOffsetY = 1; } catch(e){} |
michael@0 | 46 | try { x = ctx.shadowBlur; } catch(e){} |
michael@0 | 47 | try { ctx.shadowBlur = 1; } catch(e){} |
michael@0 | 48 | try { x = ctx.shadowColor; } catch(e){} |
michael@0 | 49 | try { ctx.shadowColor = "red"; } catch(e){} |
michael@0 | 50 | |
michael@0 | 51 | try { ctx.clearRect(0,0,100,100); } catch(e){} |
michael@0 | 52 | try { ctx.fillRect(0,0,100,100); } catch(e){} |
michael@0 | 53 | try { ctx.strokeRect(0,0,100,100); } catch(e){} |
michael@0 | 54 | |
michael@0 | 55 | try { ctx.beginPath(); } catch(e){} |
michael@0 | 56 | try { ctx.moveTo(1,1); } catch(e){} |
michael@0 | 57 | try { ctx.lineTo(10,10); } catch(e){} |
michael@0 | 58 | try { ctx.quadraticCurveTo(1,2,3,4); } catch(e){} |
michael@0 | 59 | try { ctx.bezierCurveTo(1,2,3,4,5,6); } catch(e){} |
michael@0 | 60 | try { ctx.arcTo(1,2,3,4,5); } catch(e){} |
michael@0 | 61 | try { ctx.arc(1,2,3,4,5); } catch(e){} |
michael@0 | 62 | try { ctx.arc(1,2,3,4,5,true); } catch(e){} |
michael@0 | 63 | try { ctx.rect(1,2,3,4); } catch(e){} |
michael@0 | 64 | try { ctx.closePath(); } catch(e){} |
michael@0 | 65 | |
michael@0 | 66 | try { ctx.fill(); } catch(e){} |
michael@0 | 67 | try { ctx.stroke(); } catch(e){} |
michael@0 | 68 | try { ctx.clip(); } catch(e){} |
michael@0 | 69 | |
michael@0 | 70 | try { x = ctx.font; } catch(e){} |
michael@0 | 71 | try { ctx.font = "14px sans-serif"; } catch(e){} |
michael@0 | 72 | try { x = ctx.mozTextStyle; } catch(e){} |
michael@0 | 73 | try { ctx.mozTextStyle = "14px sans-serif"; } catch(e){} |
michael@0 | 74 | try { x = ctx.textAlign; } catch(e){} |
michael@0 | 75 | try { ctx.textAlign = "right"; } catch(e){} |
michael@0 | 76 | try { x = ctx.textBaseline; } catch(e){} |
michael@0 | 77 | try { ctx.textBaseline = "top"; } catch(e){} |
michael@0 | 78 | |
michael@0 | 79 | try { ctx.fillText("",0,0); } catch(e){} |
michael@0 | 80 | try { ctx.strokeText("",0,0); } catch(e){} |
michael@0 | 81 | try { ctx.measureText(""); } catch(e){} |
michael@0 | 82 | |
michael@0 | 83 | try { ctx.mozDrawText(""); } catch(e){} |
michael@0 | 84 | try { ctx.mozPathText(""); } catch(e){} |
michael@0 | 85 | try { ctx.mozTextAlongPath("",true); } catch(e){} |
michael@0 | 86 | try { ctx.mozTextAlongPath("",false); } catch(e){} |
michael@0 | 87 | |
michael@0 | 88 | try { ctx.drawImage(document.getElementsByTagName('img')[0], 0, 0); } catch(e){} |
michael@0 | 89 | try { ctx.isPointInPath(0, 0); } catch(e){} |
michael@0 | 90 | try { ctx.createImageData(); } catch(e){} |
michael@0 | 91 | try { ctx.getImageData(); } catch(e){} |
michael@0 | 92 | try { ctx.putImageData(); } catch(e){} |
michael@0 | 93 | |
michael@0 | 94 | try { x = ctx.mozImageSmoothingEnabled; } catch(e){} |
michael@0 | 95 | try { ctx.mozImageSmoothingEnabled = false; } catch(e){} |
michael@0 | 96 | try { ctx.mozImageSmoothingEnabled = true; } catch(e){} |
michael@0 | 97 | |
michael@0 | 98 | try { ctx.drawWindow(window, 0, 0, 0, 0, "red"); } catch(e){} |
michael@0 | 99 | } |
michael@0 | 100 | |
michael@0 | 101 | </script> |
michael@0 | 102 | </head> |
michael@0 | 103 | <body onload="boom();"><img width="100" height="100" src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs="></body> |
michael@0 | 104 | </html> |