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

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

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" class="reftest-wait">
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 var video = document.createElement("video");
michael@0 13 video.src = "black140x100.ogv";
michael@0 14 video.load();
michael@0 15 function draw() {
michael@0 16 var canvas = document.getElementById("canvas");
michael@0 17 var ctx = canvas.getContext("2d");
michael@0 18 try {
michael@0 19 ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
michael@0 20 } catch (e) {
michael@0 21 }
michael@0 22 document.documentElement.removeAttribute("class");
michael@0 23 }
michael@0 24 video.addEventListener("loadeddata", draw, false);
michael@0 25 </script>
michael@0 26 </body>
michael@0 27 </html>
michael@0 28 </foreignObject>
michael@0 29 </svg>

mercurial