| Index: third_party/WebKit/LayoutTests/svg/canvas/image-svg-intrinsic-size.html
|
| diff --git a/third_party/WebKit/LayoutTests/svg/canvas/image-svg-intrinsic-size.html b/third_party/WebKit/LayoutTests/svg/canvas/image-svg-intrinsic-size.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..917e029e8d7bc744e85d2d0cdfc37fd3f282a9fe
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/svg/canvas/image-svg-intrinsic-size.html
|
| @@ -0,0 +1,19 @@
|
| +<!DOCTYPE html>
|
| +<title>Canvas.drawImage with SVG image</title>
|
| +<canvas width="300" height="300"></canvas>
|
| +<script>
|
| + function createSVGImage() {
|
| + var image = document.createElement('img');
|
| + image.style.width = "5px";
|
| + image.src = "data:image/svg+xml," +
|
| + "<svg xmlns='http://www.w3.org/2000/svg' width='200' viewBox='0 0 1 1'>" +
|
| + "<rect width='1' height='1' fill='green'/></svg>";
|
| + return image;
|
| + }
|
| + document.body.appendChild(createSVGImage());
|
| + document.body.offsetTop; // Force layout
|
| + var canvas = document.querySelector('canvas');
|
| + var ctx = canvas.getContext("2d");
|
| + ctx.drawImage(document.querySelector('img'), 0, 0);
|
| + document.body.removeChild(document.querySelector('img'));
|
| +</script>
|
|
|