| Index: third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
|
| diff --git a/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html b/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
|
| index 03e092564cc3f395172921a53e473c7211570ae0..6a84c91ca0e63b3b0299055ed1952344e5f92c18 100644
|
| --- a/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
|
| +++ b/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
|
| @@ -1,32 +1,37 @@
|
| <!DOCTYPE html>
|
| <title>Sizing SVG image when drawn to canvas</title>
|
| <script>
|
| -function createCircle(x, y, r, sx, sy)
|
| +function createCanvas(drawFunc)
|
| {
|
| var canvas = document.createElement('canvas');
|
| canvas.width = 100;
|
| canvas.height = 100;
|
| document.documentElement.appendChild(canvas);
|
|
|
| - var ctx = canvas.getContext('2d');
|
| + drawFunc(canvas.getContext('2d'));
|
| +}
|
| +
|
| +function drawCircle(ctx, x, y, r, sx, sy)
|
| +{
|
| ctx.fillStyle = "blue";
|
|
|
| - ctx.translate(50, 50);
|
| ctx.scale(sx || 1, sy || 1);
|
| ctx.beginPath();
|
| ctx.arc(x, y, r, 0, 2*Math.PI);
|
| ctx.fill();
|
| }
|
| -createCircle(0, 0, 50);
|
| -createCircle(0, -25, 25);
|
| -createCircle(-25, 0, 25);
|
| -createCircle(0, 0, 25, 1, 2);
|
| -createCircle(0, 0, 25, 2, 1);
|
| -createCircle(-25, 0, 25);
|
| -createCircle(0, -25, 25);
|
| -createCircle(0, -25, 25);
|
| -createCircle(0, 0, 50);
|
| -createCircle(0, 0, 50);
|
| -createCircle(0, -25, 25);
|
| -createCircle(0, 0, 50);
|
| +
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 25, 50, 25); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25, 1, 2); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 25, 50, 25, 2, 1); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 25, 50, 25); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); drawCircle(ctx, 50, 75, 25); });
|
| +createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
|
| +
|
| </script>
|
|
|