Bug 663190 - Calling strokeRect with zero width or height should do nothing; r=smaug

This commit is contained in:
Ms2ger 2011-06-11 09:57:47 +02:00
parent a6c4503b05
commit d0671160d0
2 changed files with 4 additions and 1 deletions

View File

@ -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);
}

View File

@ -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);
}