layout/reftests/ogg-video/canvas-1b.xhtml

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 <?xml version="1.0" encoding="UTF-8"?>
michael@0 2 <svg xmlns="http://www.w3.org/2000/svg"
michael@0 3 xmlns:xlink="http://www.w3.org/1999/xlink"
michael@0 4 version="1.1">
michael@0 5 <!-- use an empty g to force filters.svg to load before onload -->
michael@0 6 <use xlink:href="../filters.svg#empty" />
michael@0 7 <foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
michael@0 8 <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
michael@0 9 <body>
michael@0 10 <canvas id="canvas" width="200" height="200"></canvas>
michael@0 11 <script>
michael@0 12 function draw() {
michael@0 13 var video = document.getElementById("video");
michael@0 14 var canvas = document.getElementById("canvas");
michael@0 15 var ctx = canvas.getContext("2d");
michael@0 16 try {
michael@0 17 ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
michael@0 18 } catch (e) {
michael@0 19 }
michael@0 20 document.documentElement.removeAttribute("class");
michael@0 21 }
michael@0 22 </script>
michael@0 23 <video id="video" src="black140x100.ogv" onloadeddata="draw()" style="opacity:0"></video>
michael@0 24 </body>
michael@0 25 </html>
michael@0 26 </foreignObject>
michael@0 27 </svg>

mercurial