diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 47b62fed6f8..6ad89d22df9 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -2028,6 +2028,9 @@ nsCanvasRenderingContext2D::FillRect(float x, float y, float w, float h) NS_IMETHODIMP nsCanvasRenderingContext2D::StrokeRect(float x, float y, float w, float h) { + if (w == 0.f && h == 0.f) { + return NS_OK; + } return DrawRect(gfxRect(x, y, w, h), STYLE_STROKE); } diff --git a/content/canvas/test/test_canvas.html b/content/canvas/test/test_canvas.html index 4702e4cca06..1bccbcdac8d 100644 --- a/content/canvas/test/test_canvas.html +++ b/content/canvas/test/test_canvas.html @@ -18395,7 +18395,7 @@ ctx.lineWidth = 250; ctx.lineCap = 'round'; ctx.lineJoin = 'round'; ctx.strokeRect(50, 25, 0, 0); -todo_isPixel(ctx, 50,25, 0,0,0,0, 0); +isPixel(ctx, 50,25, 0,0,0,0, 0); }