author | Benjamin Peterson <benjamin@python.org> |
Fri, 03 Jun 2011 07:50:14 +0200 | |
changeset 70488 | 8a133638f5b6 |
parent 70487 | c5aa6fb2f937 |
child 70489 | 5b0986336b74 |
push id | 20338 |
push user | dgottwald@mozilla.com |
push date | 2011-06-03 05:51 +0000 |
treeherder | mozilla-central@8a133638f5b6 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | joe, roc |
bugs | 405300 |
milestone | 7.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
content/canvas/src/nsCanvasRenderingContext2D.cpp | file | annotate | diff | comparison | revisions | |
content/canvas/test/test_canvas.html | file | annotate | diff | comparison | revisions |
--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -3228,17 +3228,18 @@ nsCanvasRenderingContext2D::GetMiterLimi NS_IMETHODIMP nsCanvasRenderingContext2D::IsPointInPath(float x, float y, PRBool *retVal) { if (!FloatValidate(x,y)) { *retVal = PR_FALSE; return NS_OK; } - *retVal = mThebes->PointInFill(gfxPoint(x,y)); + gfxPoint pt(x, y); + *retVal = mThebes->PointInFill(mThebes->DeviceToUser(pt)); return NS_OK; } // // image // // drawImage(in HTMLImageElement image, in float dx, in float dy);
--- a/content/canvas/test/test_canvas.html +++ b/content/canvas/test/test_canvas.html @@ -13271,20 +13271,20 @@ ok(ctx.isPointInPath(50, 10) === true, " function test_2d_path_isPointInPath_transform_1() { var canvas = document.getElementById('c409'); var ctx = canvas.getContext('2d'); ctx.translate(50, 0); ctx.rect(0, 0, 20, 20); ok(ctx.isPointInPath(-40, 10) === false, "ctx.isPointInPath(-40, 10) === false"); -todo(ctx.isPointInPath(10, 10) === false, "ctx.isPointInPath(10, 10) === false"); +ok(ctx.isPointInPath(10, 10) === false, "ctx.isPointInPath(10, 10) === false"); ok(ctx.isPointInPath(49, 10) === false, "ctx.isPointInPath(49, 10) === false"); -todo(ctx.isPointInPath(51, 10) === true, "ctx.isPointInPath(51, 10) === true"); -todo(ctx.isPointInPath(69, 10) === true, "ctx.isPointInPath(69, 10) === true"); +ok(ctx.isPointInPath(51, 10) === true, "ctx.isPointInPath(51, 10) === true"); +ok(ctx.isPointInPath(69, 10) === true, "ctx.isPointInPath(69, 10) === true"); ok(ctx.isPointInPath(71, 10) === false, "ctx.isPointInPath(71, 10) === false"); } </script> <!-- [[[ test_2d.path.isPointInPath.transform.2.html ]]] --> @@ -13296,20 +13296,20 @@ ok(ctx.isPointInPath(71, 10) === false, function test_2d_path_isPointInPath_transform_2() { var canvas = document.getElementById('c410'); var ctx = canvas.getContext('2d'); ctx.rect(50, 0, 20, 20); ctx.translate(50, 0); ok(ctx.isPointInPath(-40, 10) === false, "ctx.isPointInPath(-40, 10) === false"); -todo(ctx.isPointInPath(10, 10) === false, "ctx.isPointInPath(10, 10) === false"); +ok(ctx.isPointInPath(10, 10) === false, "ctx.isPointInPath(10, 10) === false"); ok(ctx.isPointInPath(49, 10) === false, "ctx.isPointInPath(49, 10) === false"); -todo(ctx.isPointInPath(51, 10) === true, "ctx.isPointInPath(51, 10) === true"); -todo(ctx.isPointInPath(69, 10) === true, "ctx.isPointInPath(69, 10) === true"); +ok(ctx.isPointInPath(51, 10) === true, "ctx.isPointInPath(51, 10) === true"); +ok(ctx.isPointInPath(69, 10) === true, "ctx.isPointInPath(69, 10) === true"); ok(ctx.isPointInPath(71, 10) === false, "ctx.isPointInPath(71, 10) === false"); } </script> <!-- [[[ test_2d.path.isPointInPath.transform.3.html ]]] --> @@ -13323,18 +13323,18 @@ function test_2d_path_isPointInPath_tran var canvas = document.getElementById('c411'); var ctx = canvas.getContext('2d'); ctx.scale(-1, 1); ctx.rect(-70, 0, 20, 20); ok(ctx.isPointInPath(-40, 10) === false, "ctx.isPointInPath(-40, 10) === false"); ok(ctx.isPointInPath(10, 10) === false, "ctx.isPointInPath(10, 10) === false"); ok(ctx.isPointInPath(49, 10) === false, "ctx.isPointInPath(49, 10) === false"); -todo(ctx.isPointInPath(51, 10) === true, "ctx.isPointInPath(51, 10) === true"); -todo(ctx.isPointInPath(69, 10) === true, "ctx.isPointInPath(69, 10) === true"); +ok(ctx.isPointInPath(51, 10) === true, "ctx.isPointInPath(51, 10) === true"); +ok(ctx.isPointInPath(69, 10) === true, "ctx.isPointInPath(69, 10) === true"); ok(ctx.isPointInPath(71, 10) === false, "ctx.isPointInPath(71, 10) === false"); } </script> <!-- [[[ test_2d.path.isPointInPath.unclosed.html ]]] -->