layout/reftests/webm-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.

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

mercurial