1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/webm-video/canvas-1b.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,27 @@ 1.4 +<?xml version="1.0" encoding="UTF-8"?> 1.5 +<svg xmlns="http://www.w3.org/2000/svg" 1.6 + xmlns:xlink="http://www.w3.org/1999/xlink" 1.7 + version="1.1"> 1.8 +<!-- use an empty g to force filters.svg to load before onload --> 1.9 +<use xlink:href="../filters.svg#empty" /> 1.10 +<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%"> 1.11 +<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 1.12 +<body> 1.13 +<canvas id="canvas" width="200" height="200"></canvas> 1.14 +<script> 1.15 +function draw() { 1.16 + var video = document.getElementById("video"); 1.17 + var canvas = document.getElementById("canvas"); 1.18 + var ctx = canvas.getContext("2d"); 1.19 + try { 1.20 + ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight); 1.21 + } catch (e) { 1.22 + } 1.23 + document.documentElement.removeAttribute("class"); 1.24 +} 1.25 +</script> 1.26 +<video id="video" src="black140x100.webm" onloadeddata="draw()" style="opacity:0"></video> 1.27 +</body> 1.28 +</html> 1.29 +</foreignObject> 1.30 +</svg>