Bug 803124 - Rename mozIsPointInStroke to IsPointInStroke. r=jmuizelaar
authorTobias Schneider <tschneider@mozilla.com>
Thu, 22 Nov 2012 14:37:42 +0100
changeset 125320 eed5cbd0b622a53fcc18663bb03cdef7b342f14a
parent 125319 2992fbea1370d46bfd7415b2bf711ca2c073da38
child 125321 afe8da61183fcedfc18e29dd18e6a6af0f7831cc
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar
bugs803124
milestone20.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
Bug 803124 - Rename mozIsPointInStroke to IsPointInStroke. r=jmuizelaar
content/canvas/src/CanvasRenderingContext2D.cpp
content/canvas/src/CanvasRenderingContext2D.h
content/canvas/test/Makefile.in
content/canvas/test/test_isPointInStroke.html
content/canvas/test/test_mozIsPointInStroke.html
dom/webidl/CanvasRenderingContext2D.webidl
--- a/content/canvas/src/CanvasRenderingContext2D.cpp
+++ b/content/canvas/src/CanvasRenderingContext2D.cpp
@@ -2848,17 +2848,17 @@ CanvasRenderingContext2D::IsPointInPath(
   }
   if (mPathTransformWillUpdate) {
     return mPath->ContainsPoint(Point(x, y), mPathToDS);
   }
   return mPath->ContainsPoint(Point(x, y), mTarget->GetTransform());
 }
 
 bool
-CanvasRenderingContext2D::MozIsPointInStroke(double x, double y)
+CanvasRenderingContext2D::IsPointInStroke(double x, double y)
 {
   if (!FloatValidate(x,y)) {
     return false;
   }
 
   EnsureUserSpacePath();
   if (!mPath) {
     return false;
--- a/content/canvas/src/CanvasRenderingContext2D.h
+++ b/content/canvas/src/CanvasRenderingContext2D.h
@@ -237,17 +237,17 @@ public:
   void ClearRect(double x, double y, double w, double h);
   void FillRect(double x, double y, double w, double h);
   void StrokeRect(double x, double y, double w, double h);
   void BeginPath();
   void Fill();
   void Stroke();
   void Clip();
   bool IsPointInPath(double x, double y);
-  bool MozIsPointInStroke(double x, double y);
+  bool IsPointInStroke(double x, double y);
   void FillText(const nsAString& text, double x, double y,
                 const mozilla::dom::Optional<double>& maxWidth,
                 mozilla::ErrorResult& error);
   void StrokeText(const nsAString& text, double x, double y,
                   const mozilla::dom::Optional<double>& maxWidth,
                   mozilla::ErrorResult& error);
   already_AddRefed<nsIDOMTextMetrics>
     MeasureText(const nsAString& rawText, mozilla::ErrorResult& error);
--- a/content/canvas/test/Makefile.in
+++ b/content/canvas/test/Makefile.in
@@ -8,16 +8,17 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 DIRS		+= webgl crossorigin chrome
 
 include $(DEPTH)/config/autoconf.mk
 MOCHITEST_FILES = \
 	test_canvas.html \
+	test_isPointInStroke.html \
 	image_transparent50.png \
 	image_redtransparent.png \
 	image_yellow.png \
 	image_anim-poster-gr.png \
 	image_green-16x16.png \
 	image_red-16x16.png \
 	image_green-1x1.png \
 	image_ggrr-256x256.png \
@@ -93,17 +94,16 @@ MOCHITEST_FILES = \
 	test_2d.composite.uncovered.fill.luminosity.html \
 	test_2d.drawImage.zerocanvas.html \
 	test_2d.strokeRect.zero.5.html \
 	test_toBlob.html \
 	test_toDataURL_alpha.html \
 	test_toDataURL_lowercase_ascii.html \
 	test_toDataURL_parameters.html \
 	test_mozGetAsFile.html \
-	test_mozIsPointInStroke.html \
 	test_canvas_strokeStyle_getter.html \
 	test_bug613794.html \
 	test_bug753758.html \
 	test_bug764125.html \
 	test_drawImage_edge_cases.html \
 	test_drawImage_document_domain.html \
   test_mozDashOffset.html \
 	file_drawImage_document_domain.html \
rename from content/canvas/test/test_mozIsPointInStroke.html
rename to content/canvas/test/test_isPointInStroke.html
--- a/content/canvas/test/test_mozIsPointInStroke.html
+++ b/content/canvas/test/test_isPointInStroke.html
@@ -1,244 +1,244 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <meta charset="utf-8">
-  <title>Canvas test: mozIsPointInStroke</title>
+  <title>Canvas test: isPointInStroke</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script type="application/javascript">
 
 var canvas = document.getElementById('c');
 var ctx = canvas.getContext('2d');
 
 
 ctx.lineWidth = 5;
 
 
-ok(ctx.mozIsPointInStroke(50, 25) === false, 'ctx.mozIsPointInStroke(50, 25) === false');
+ok(ctx.isPointInStroke(50, 25) === false, 'ctx.isPointInStroke(50, 25) === false');
 
 
 ctx.beginPath();
 ctx.rect(0, 0, 20, 20);
 
-ok(ctx.mozIsPointInStroke(-4, -4) === false, 'ctx.mozIsPointInStroke(-4, -4) === false');
-ok(ctx.mozIsPointInStroke(4, 4) === false, 'ctx.mozIsPointInStroke(4, 4) === false');
-ok(ctx.mozIsPointInStroke(16, 16) === false, 'ctx.mozIsPointInStroke(16, 16) === false');
-ok(ctx.mozIsPointInStroke(24, 24) === false, 'ctx.mozIsPointInStroke(24, 24) === false');
+ok(ctx.isPointInStroke(-4, -4) === false, 'ctx.isPointInStroke(-4, -4) === false');
+ok(ctx.isPointInStroke(4, 4) === false, 'ctx.isPointInStroke(4, 4) === false');
+ok(ctx.isPointInStroke(16, 16) === false, 'ctx.isPointInStroke(16, 16) === false');
+ok(ctx.isPointInStroke(24, 24) === false, 'ctx.isPointInStroke(24, 24) === false');
 
-ok(ctx.mozIsPointInStroke(-2, -2) === true, 'ctx.mozIsPointInStroke(-2, -2) === true');
-ok(ctx.mozIsPointInStroke(2, 2) === true, 'ctx.mozIsPointInStroke(2, 2) === true');
-ok(ctx.mozIsPointInStroke(18, 18) === true, 'ctx.mozIsPointInStroke(18, 18) === true');
-ok(ctx.mozIsPointInStroke(22, 22) === true, 'ctx.mozIsPointInStroke(22, 22) === true');
+ok(ctx.isPointInStroke(-2, -2) === true, 'ctx.isPointInStroke(-2, -2) === true');
+ok(ctx.isPointInStroke(2, 2) === true, 'ctx.isPointInStroke(2, 2) === true');
+ok(ctx.isPointInStroke(18, 18) === true, 'ctx.isPointInStroke(18, 18) === true');
+ok(ctx.isPointInStroke(22, 22) === true, 'ctx.isPointInStroke(22, 22) === true');
 
 
 ctx.beginPath();
 ctx.rect(25, 25, 20, 20);
 
-ok(ctx.mozIsPointInStroke(21, 21) === false, 'ctx.mozIsPointInStroke(21, 21) === false');
-ok(ctx.mozIsPointInStroke(29, 29) === false, 'ctx.mozIsPointInStroke(29, 29) === false');
-ok(ctx.mozIsPointInStroke(42, 42) === false, 'ctx.mozIsPointInStroke(42, 42) === false');
-ok(ctx.mozIsPointInStroke(50, 50) === false, 'ctx.mozIsPointInStroke(50, 50) === false');
+ok(ctx.isPointInStroke(21, 21) === false, 'ctx.isPointInStroke(21, 21) === false');
+ok(ctx.isPointInStroke(29, 29) === false, 'ctx.isPointInStroke(29, 29) === false');
+ok(ctx.isPointInStroke(42, 42) === false, 'ctx.isPointInStroke(42, 42) === false');
+ok(ctx.isPointInStroke(50, 50) === false, 'ctx.isPointInStroke(50, 50) === false');
 
-ok(ctx.mozIsPointInStroke(23, 23) === true, 'ctx.mozIsPointInStroke(23, 23) === true');
-ok(ctx.mozIsPointInStroke(27, 27) === true, 'ctx.mozIsPointInStroke(27, 27) === true');
-ok(ctx.mozIsPointInStroke(43, 43) === true, 'ctx.mozIsPointInStroke(43, 43) === true');
-ok(ctx.mozIsPointInStroke(47, 47) === true, 'ctx.mozIsPointInStroke(47, 47) === true');
+ok(ctx.isPointInStroke(23, 23) === true, 'ctx.isPointInStroke(23, 23) === true');
+ok(ctx.isPointInStroke(27, 27) === true, 'ctx.isPointInStroke(27, 27) === true');
+ok(ctx.isPointInStroke(43, 43) === true, 'ctx.isPointInStroke(43, 43) === true');
+ok(ctx.isPointInStroke(47, 47) === true, 'ctx.isPointInStroke(47, 47) === true');
 
 
 ctx.beginPath();
 ctx.moveTo(25, 25);
 ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
 
-ok(ctx.mozIsPointInStroke(23, 26) === false, 'ctx.mozIsPointInStroke(23, 26) === false');
-ok(ctx.mozIsPointInStroke(75, 23) === false, 'ctx.mozIsPointInStroke(75, 23) === false');
-ok(ctx.mozIsPointInStroke(37, 8) === false, 'ctx.mozIsPointInStroke(37, 8) === false');
-ok(ctx.mozIsPointInStroke(61, 42) === false, 'ctx.mozIsPointInStroke(61, 42) === false');
+ok(ctx.isPointInStroke(23, 26) === false, 'ctx.isPointInStroke(23, 26) === false');
+ok(ctx.isPointInStroke(75, 23) === false, 'ctx.isPointInStroke(75, 23) === false');
+ok(ctx.isPointInStroke(37, 8) === false, 'ctx.isPointInStroke(37, 8) === false');
+ok(ctx.isPointInStroke(61, 42) === false, 'ctx.isPointInStroke(61, 42) === false');
 
-ok(ctx.mozIsPointInStroke(24, 24) === true, 'ctx.mozIsPointInStroke(24, 24) === true');
-ok(ctx.mozIsPointInStroke(74, 25) === true, 'ctx.mozIsPointInStroke(74, 25) === true');
-ok(ctx.mozIsPointInStroke(37, 2) === true, 'ctx.mozIsPointInStroke(37, 2) === true');
-ok(ctx.mozIsPointInStroke(61, 47) === true, 'ctx.mozIsPointInStroke(61, 47) === true');
+ok(ctx.isPointInStroke(24, 24) === true, 'ctx.isPointInStroke(24, 24) === true');
+ok(ctx.isPointInStroke(74, 25) === true, 'ctx.isPointInStroke(74, 25) === true');
+ok(ctx.isPointInStroke(37, 2) === true, 'ctx.isPointInStroke(37, 2) === true');
+ok(ctx.isPointInStroke(61, 47) === true, 'ctx.isPointInStroke(61, 47) === true');
 
 
 ctx.beginPath();
 ctx.arc(50, 25, 10, 0, Math.PI, false);
 
-ok(ctx.mozIsPointInStroke(39, 23) === false, 'ctx.mozIsPointInStroke(39, 23) === false');
-ok(ctx.mozIsPointInStroke(50, 15) === false, 'ctx.mozIsPointInStroke(50, 15) === false');
-ok(ctx.mozIsPointInStroke(60, 23) === false, 'ctx.mozIsPointInStroke(60, 23) === false');
-ok(ctx.mozIsPointInStroke(50, 25) === false, 'ctx.mozIsPointInStroke(50, 25) === false');
+ok(ctx.isPointInStroke(39, 23) === false, 'ctx.isPointInStroke(39, 23) === false');
+ok(ctx.isPointInStroke(50, 15) === false, 'ctx.isPointInStroke(50, 15) === false');
+ok(ctx.isPointInStroke(60, 23) === false, 'ctx.isPointInStroke(60, 23) === false');
+ok(ctx.isPointInStroke(50, 25) === false, 'ctx.isPointInStroke(50, 25) === false');
 
-ok(ctx.mozIsPointInStroke(39, 26) === true, 'ctx.mozIsPointInStroke(39, 26) === true');
-ok(ctx.mozIsPointInStroke(45, 33) === true, 'ctx.mozIsPointInStroke(45, 33) === true');
-ok(ctx.mozIsPointInStroke(53, 33) === true, 'ctx.mozIsPointInStroke(53, 33) === true');
-ok(ctx.mozIsPointInStroke(59, 26) === true, 'ctx.mozIsPointInStroke(59, 26) === true');
+ok(ctx.isPointInStroke(39, 26) === true, 'ctx.isPointInStroke(39, 26) === true');
+ok(ctx.isPointInStroke(45, 33) === true, 'ctx.isPointInStroke(45, 33) === true');
+ok(ctx.isPointInStroke(53, 33) === true, 'ctx.isPointInStroke(53, 33) === true');
+ok(ctx.isPointInStroke(59, 26) === true, 'ctx.isPointInStroke(59, 26) === true');
 
 
 ctx.beginPath();
 ctx.arc(50, 25, 10, 0, 2 * Math.PI, false);
 
-ok(ctx.mozIsPointInStroke(34, 25) === false, 'ctx.mozIsPointInStroke(34, 25) === false');
-ok(ctx.mozIsPointInStroke(44, 25) === false, 'ctx.mozIsPointInStroke(44, 25) === false');
-ok(ctx.mozIsPointInStroke(49, 30) === false, 'ctx.mozIsPointInStroke(49, 30) === false');
-ok(ctx.mozIsPointInStroke(49, 40) === false, 'ctx.mozIsPointInStroke(49, 40) === false');
+ok(ctx.isPointInStroke(34, 25) === false, 'ctx.isPointInStroke(34, 25) === false');
+ok(ctx.isPointInStroke(44, 25) === false, 'ctx.isPointInStroke(44, 25) === false');
+ok(ctx.isPointInStroke(49, 30) === false, 'ctx.isPointInStroke(49, 30) === false');
+ok(ctx.isPointInStroke(49, 40) === false, 'ctx.isPointInStroke(49, 40) === false');
 
-ok(ctx.mozIsPointInStroke(39, 23) === true, 'ctx.mozIsPointInStroke(39, 23) === true');
-ok(ctx.mozIsPointInStroke(50, 15) === true, 'ctx.mozIsPointInStroke(50, 15) === true');
-ok(ctx.mozIsPointInStroke(60, 23) === true, 'ctx.mozIsPointInStroke(60, 23) === true');
-ok(ctx.mozIsPointInStroke(49, 34) === true, 'ctx.mozIsPointInStroke(49, 34) === true');
+ok(ctx.isPointInStroke(39, 23) === true, 'ctx.isPointInStroke(39, 23) === true');
+ok(ctx.isPointInStroke(50, 15) === true, 'ctx.isPointInStroke(50, 15) === true');
+ok(ctx.isPointInStroke(60, 23) === true, 'ctx.isPointInStroke(60, 23) === true');
+ok(ctx.isPointInStroke(49, 34) === true, 'ctx.isPointInStroke(49, 34) === true');
 
 
 ctx.beginPath();
 ctx.save();
 ctx.translate(20, 20);
 ctx.rect(0, 0, 20, 20);
 
-ok(ctx.mozIsPointInStroke(16, 16) === false, 'ctx.mozIsPointInStroke(16, 16) === false');
-ok(ctx.mozIsPointInStroke(24, 24) === false, 'ctx.mozIsPointInStroke(24, 24) === false');
-ok(ctx.mozIsPointInStroke(36, 36) === false, 'ctx.mozIsPointInStroke(36, 36) === false');
-ok(ctx.mozIsPointInStroke(44, 44) === false, 'ctx.mozIsPointInStroke(44, 44) === false');
+ok(ctx.isPointInStroke(16, 16) === false, 'ctx.isPointInStroke(16, 16) === false');
+ok(ctx.isPointInStroke(24, 24) === false, 'ctx.isPointInStroke(24, 24) === false');
+ok(ctx.isPointInStroke(36, 36) === false, 'ctx.isPointInStroke(36, 36) === false');
+ok(ctx.isPointInStroke(44, 44) === false, 'ctx.isPointInStroke(44, 44) === false');
 
-ok(ctx.mozIsPointInStroke(18, 18) === true, 'ctx.mozIsPointInStroke(18, 18) === true');
-ok(ctx.mozIsPointInStroke(22, 22) === true, 'ctx.mozIsPointInStroke(22, 22) === true');
-ok(ctx.mozIsPointInStroke(38, 38) === true, 'ctx.mozIsPointInStroke(38, 38) === true');
-ok(ctx.mozIsPointInStroke(42, 42) === true, 'ctx.mozIsPointInStroke(42, 42) === true');
+ok(ctx.isPointInStroke(18, 18) === true, 'ctx.isPointInStroke(18, 18) === true');
+ok(ctx.isPointInStroke(22, 22) === true, 'ctx.isPointInStroke(22, 22) === true');
+ok(ctx.isPointInStroke(38, 38) === true, 'ctx.isPointInStroke(38, 38) === true');
+ok(ctx.isPointInStroke(42, 42) === true, 'ctx.isPointInStroke(42, 42) === true');
 
 ctx.restore();
 
 
 ctx.beginPath();
 ctx.save();
 ctx.scale(-1, 1);
 ctx.rect(-30, 20, 20, 20);
 
-ok(ctx.mozIsPointInStroke(16, 16) === false, 'ctx.mozIsPointInStroke(16, 16) === false');
-ok(ctx.mozIsPointInStroke(14, 24) === false, 'ctx.mozIsPointInStroke(14, 24) === false');
-ok(ctx.mozIsPointInStroke(26, 36) === false, 'ctx.mozIsPointInStroke(26, 36) === false');
-ok(ctx.mozIsPointInStroke(34, 44) === false, 'ctx.mozIsPointInStroke(34, 44) === false');
+ok(ctx.isPointInStroke(16, 16) === false, 'ctx.isPointInStroke(16, 16) === false');
+ok(ctx.isPointInStroke(14, 24) === false, 'ctx.isPointInStroke(14, 24) === false');
+ok(ctx.isPointInStroke(26, 36) === false, 'ctx.isPointInStroke(26, 36) === false');
+ok(ctx.isPointInStroke(34, 44) === false, 'ctx.isPointInStroke(34, 44) === false');
 
-ok(ctx.mozIsPointInStroke(8, 18) === true, 'ctx.mozIsPointInStroke(8, 18) === true');
-ok(ctx.mozIsPointInStroke(12, 22) === true, 'ctx.mozIsPointInStroke(12, 22) === true');
-ok(ctx.mozIsPointInStroke(28, 38) === true, 'ctx.mozIsPointInStroke(28, 38) === true');
-ok(ctx.mozIsPointInStroke(32, 42) === true, 'ctx.mozIsPointInStroke(32, 42) === true');
+ok(ctx.isPointInStroke(8, 18) === true, 'ctx.isPointInStroke(8, 18) === true');
+ok(ctx.isPointInStroke(12, 22) === true, 'ctx.isPointInStroke(12, 22) === true');
+ok(ctx.isPointInStroke(28, 38) === true, 'ctx.isPointInStroke(28, 38) === true');
+ok(ctx.isPointInStroke(32, 42) === true, 'ctx.isPointInStroke(32, 42) === true');
 
 ctx.restore();
 
 
 ctx.beginPath();
 ctx.save();
 ctx.lineWidth = 2;
 ctx.translate(50, 25);
 ctx.rotate(180 * Math.PI / 180);
 ctx.scale(5, 5);
 ctx.arc(0, 0, 2, 0, Math.PI, false);
 
-ok(ctx.mozIsPointInStroke(39, 26) === false, 'ctx.mozIsPointInStroke(39, 26) === false');
-ok(ctx.mozIsPointInStroke(45, 33) === false, 'ctx.mozIsPointInStroke(45, 33) === false');
-ok(ctx.mozIsPointInStroke(53, 33) === false, 'ctx.mozIsPointInStroke(53, 33) === false');
-ok(ctx.mozIsPointInStroke(59, 26) === false, 'ctx.mozIsPointInStroke(59, 26) === false');
+ok(ctx.isPointInStroke(39, 26) === false, 'ctx.isPointInStroke(39, 26) === false');
+ok(ctx.isPointInStroke(45, 33) === false, 'ctx.isPointInStroke(45, 33) === false');
+ok(ctx.isPointInStroke(53, 33) === false, 'ctx.isPointInStroke(53, 33) === false');
+ok(ctx.isPointInStroke(59, 26) === false, 'ctx.isPointInStroke(59, 26) === false');
 
-ok(ctx.mozIsPointInStroke(39, 23) === true, 'ctx.mozIsPointInStroke(39, 23) === true');
-ok(ctx.mozIsPointInStroke(45, 15) === true, 'ctx.mozIsPointInStroke(50, 15) === true');
-ok(ctx.mozIsPointInStroke(55, 15) === true, 'ctx.mozIsPointInStroke(50, 25) === true');
-ok(ctx.mozIsPointInStroke(60, 23) === true, 'ctx.mozIsPointInStroke(60, 23) === true');
+ok(ctx.isPointInStroke(39, 23) === true, 'ctx.isPointInStroke(39, 23) === true');
+ok(ctx.isPointInStroke(45, 15) === true, 'ctx.isPointInStroke(50, 15) === true');
+ok(ctx.isPointInStroke(55, 15) === true, 'ctx.isPointInStroke(50, 25) === true');
+ok(ctx.isPointInStroke(60, 23) === true, 'ctx.isPointInStroke(60, 23) === true');
 
 ctx.restore();
 
 
 ctx.beginPath();
 
 ctx.moveTo(10, 10);
 ctx.lineTo(30, 10);
 ctx.save();
 ctx.lineWidth = 2;
 ctx.scale(5, 5);
 ctx.lineTo(6, 6);
 ctx.lineTo(2, 6);
 ctx.restore();
 ctx.closePath();
 
-ok(ctx.mozIsPointInStroke(6, 6) === false, 'ctx.mozIsPointInStroke(6, 6) === false');
-ok(ctx.mozIsPointInStroke(14, 14) === false, 'ctx.mozIsPointInStroke(14, 14) === false');
-ok(ctx.mozIsPointInStroke(26, 26) === false, 'ctx.mozIsPointInStroke(26, 26) === false');
-ok(ctx.mozIsPointInStroke(34, 34) === false, 'ctx.mozIsPointInStroke(34, 34) === false');
+ok(ctx.isPointInStroke(6, 6) === false, 'ctx.isPointInStroke(6, 6) === false');
+ok(ctx.isPointInStroke(14, 14) === false, 'ctx.isPointInStroke(14, 14) === false');
+ok(ctx.isPointInStroke(26, 26) === false, 'ctx.isPointInStroke(26, 26) === false');
+ok(ctx.isPointInStroke(34, 34) === false, 'ctx.isPointInStroke(34, 34) === false');
 
-ok(ctx.mozIsPointInStroke(8, 8) === true, 'ctx.mozIsPointInStroke(8, 8) === true');
-ok(ctx.mozIsPointInStroke(12, 12) === true, 'ctx.mozIsPointInStroke(12, 12) === true');
-ok(ctx.mozIsPointInStroke(28, 28) === true, 'ctx.mozIsPointInStroke(28, 28) === true');
-ok(ctx.mozIsPointInStroke(32, 32) === true, 'ctx.mozIsPointInStroke(32, 32) === true');
+ok(ctx.isPointInStroke(8, 8) === true, 'ctx.isPointInStroke(8, 8) === true');
+ok(ctx.isPointInStroke(12, 12) === true, 'ctx.isPointInStroke(12, 12) === true');
+ok(ctx.isPointInStroke(28, 28) === true, 'ctx.isPointInStroke(28, 28) === true');
+ok(ctx.isPointInStroke(32, 32) === true, 'ctx.isPointInStroke(32, 32) === true');
 
 
 ctx.beginPath();
 ctx.rect(-30, -30, 20, 20);
 
-ok(ctx.mozIsPointInStroke(-34, -34) === false, 'ctx.mozIsPointInStroke(-34, -34) === false');
-ok(ctx.mozIsPointInStroke(-26, -26) === false, 'ctx.mozIsPointInStroke(-26, -26) === false');
-ok(ctx.mozIsPointInStroke(-14, -14) === false, 'ctx.mozIsPointInStroke(-14, -14) === false');
-ok(ctx.mozIsPointInStroke(-6, -6) === false, 'ctx.mozIsPointInStroke(-6, -6) === false');
+ok(ctx.isPointInStroke(-34, -34) === false, 'ctx.isPointInStroke(-34, -34) === false');
+ok(ctx.isPointInStroke(-26, -26) === false, 'ctx.isPointInStroke(-26, -26) === false');
+ok(ctx.isPointInStroke(-14, -14) === false, 'ctx.isPointInStroke(-14, -14) === false');
+ok(ctx.isPointInStroke(-6, -6) === false, 'ctx.isPointInStroke(-6, -6) === false');
 
-ok(ctx.mozIsPointInStroke(-32, -32) === true, 'ctx.mozIsPointInStroke(-32, -32) === true');
-ok(ctx.mozIsPointInStroke(-28, -28) === true, 'ctx.mozIsPointInStroke(-28, -28) === true');
-ok(ctx.mozIsPointInStroke(-12, -12) === true, 'ctx.mozIsPointInStroke(-12, -12) === true');
-ok(ctx.mozIsPointInStroke(-8, -8) === true, 'ctx.mozIsPointInStroke(-8, -8) === true');
+ok(ctx.isPointInStroke(-32, -32) === true, 'ctx.isPointInStroke(-32, -32) === true');
+ok(ctx.isPointInStroke(-28, -28) === true, 'ctx.isPointInStroke(-28, -28) === true');
+ok(ctx.isPointInStroke(-12, -12) === true, 'ctx.isPointInStroke(-12, -12) === true');
+ok(ctx.isPointInStroke(-8, -8) === true, 'ctx.isPointInStroke(-8, -8) === true');
 
 
 ctx.beginPath();
 ctx.moveTo(20, 25);
 ctx.lineTo(80, 25);
 
-ok(ctx.mozIsPointInStroke(19, 25) === false, 'ctx.mozIsPointInStroke(19, 25) === false');
-ok(ctx.mozIsPointInStroke(50, 21) === false, 'ctx.mozIsPointInStroke(50, 21) === false');
-ok(ctx.mozIsPointInStroke(81, 25) === false, 'ctx.mozIsPointInStroke(81, 25) === false');
-ok(ctx.mozIsPointInStroke(50, 29) === false, 'ctx.mozIsPointInStroke(50, 29) === false');
+ok(ctx.isPointInStroke(19, 25) === false, 'ctx.isPointInStroke(19, 25) === false');
+ok(ctx.isPointInStroke(50, 21) === false, 'ctx.isPointInStroke(50, 21) === false');
+ok(ctx.isPointInStroke(81, 25) === false, 'ctx.isPointInStroke(81, 25) === false');
+ok(ctx.isPointInStroke(50, 29) === false, 'ctx.isPointInStroke(50, 29) === false');
 
-ok(ctx.mozIsPointInStroke(21, 25) === true, 'ctx.mozIsPointInStroke(21, 25) === true');
-ok(ctx.mozIsPointInStroke(50, 23) === true, 'ctx.mozIsPointInStroke(50, 23) === true');
-ok(ctx.mozIsPointInStroke(79, 25) === true, 'ctx.mozIsPointInStroke(79, 25) === true');
-ok(ctx.mozIsPointInStroke(50, 27) === true, 'ctx.mozIsPointInStroke(50, 27) === true');
+ok(ctx.isPointInStroke(21, 25) === true, 'ctx.isPointInStroke(21, 25) === true');
+ok(ctx.isPointInStroke(50, 23) === true, 'ctx.isPointInStroke(50, 23) === true');
+ok(ctx.isPointInStroke(79, 25) === true, 'ctx.isPointInStroke(79, 25) === true');
+ok(ctx.isPointInStroke(50, 27) === true, 'ctx.isPointInStroke(50, 27) === true');
 
 
 ctx.lineWidth = 15;
 ctx.lineCap = 'round';
 
 
 ctx.beginPath();
 ctx.moveTo(20, 25);
 ctx.lineTo(80, 25);
 
-ok(ctx.mozIsPointInStroke(13, 18) === false, 'ctx.mozIsPointInStroke(13, 18) === false');
-ok(ctx.mozIsPointInStroke(13, 31) === false, 'ctx.mozIsPointInStroke(13, 31) === false');
-ok(ctx.mozIsPointInStroke(86, 18) === false, 'ctx.mozIsPointInStroke(86, 18) === false');
-ok(ctx.mozIsPointInStroke(86, 31) === false, 'ctx.mozIsPointInStroke(86, 31) === false');
+ok(ctx.isPointInStroke(13, 18) === false, 'ctx.isPointInStroke(13, 18) === false');
+ok(ctx.isPointInStroke(13, 31) === false, 'ctx.isPointInStroke(13, 31) === false');
+ok(ctx.isPointInStroke(86, 18) === false, 'ctx.isPointInStroke(86, 18) === false');
+ok(ctx.isPointInStroke(86, 31) === false, 'ctx.isPointInStroke(86, 31) === false');
 
-ok(ctx.mozIsPointInStroke(13, 25) === true, 'ctx.mozIsPointInStroke(13, 25) === true');
-ok(ctx.mozIsPointInStroke(50, 18) === true, 'ctx.mozIsPointInStroke(50, 18) === true');
-ok(ctx.mozIsPointInStroke(86, 25) === true, 'ctx.mozIsPointInStroke(86, 25) === true');
-ok(ctx.mozIsPointInStroke(50, 31) === true, 'ctx.mozIsPointInStroke(50, 31) === true');
+ok(ctx.isPointInStroke(13, 25) === true, 'ctx.isPointInStroke(13, 25) === true');
+ok(ctx.isPointInStroke(50, 18) === true, 'ctx.isPointInStroke(50, 18) === true');
+ok(ctx.isPointInStroke(86, 25) === true, 'ctx.isPointInStroke(86, 25) === true');
+ok(ctx.isPointInStroke(50, 31) === true, 'ctx.isPointInStroke(50, 31) === true');
 
 
 ctx.lineJoin = 'round';
 
 
 ctx.beginPath();
 ctx.moveTo(20, 15);
 ctx.lineTo(80, 15);
 ctx.lineTo(80, 35);
 
-ok(ctx.mozIsPointInStroke(86, 8) === false, 'ctx.mozIsPointInStroke(86, 8) === false');
-ok(ctx.mozIsPointInStroke(70, 24) === false, 'ctx.mozIsPointInStroke(70, 24) === false');
-ok(ctx.mozIsPointInStroke(73, 41) === false, 'ctx.mozIsPointInStroke(73, 41) === false');
-ok(ctx.mozIsPointInStroke(86, 41) === false, 'ctx.mozIsPointInStroke(86, 41) === false');
+ok(ctx.isPointInStroke(86, 8) === false, 'ctx.isPointInStroke(86, 8) === false');
+ok(ctx.isPointInStroke(70, 24) === false, 'ctx.isPointInStroke(70, 24) === false');
+ok(ctx.isPointInStroke(73, 41) === false, 'ctx.isPointInStroke(73, 41) === false');
+ok(ctx.isPointInStroke(86, 41) === false, 'ctx.isPointInStroke(86, 41) === false');
 
-ok(ctx.mozIsPointInStroke(14, 15) === true, 'ctx.mozIsPointInStroke(14, 15) === true');
-ok(ctx.mozIsPointInStroke(81, 15) === true, 'ctx.mozIsPointInStroke(81, 15) === true');
-ok(ctx.mozIsPointInStroke(79, 41) === true, 'ctx.mozIsPointInStroke(79, 41) === true');
-ok(ctx.mozIsPointInStroke(73, 21) === true, 'ctx.mozIsPointInStroke(73, 21) === true');
+ok(ctx.isPointInStroke(14, 15) === true, 'ctx.isPointInStroke(14, 15) === true');
+ok(ctx.isPointInStroke(81, 15) === true, 'ctx.isPointInStroke(81, 15) === true');
+ok(ctx.isPointInStroke(79, 41) === true, 'ctx.isPointInStroke(79, 41) === true');
+ok(ctx.isPointInStroke(73, 21) === true, 'ctx.isPointInStroke(73, 21) === true');
 
 </script>
 </pre>
 </body>
 </html>
 
--- a/dom/webidl/CanvasRenderingContext2D.webidl
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -91,16 +91,17 @@ interface CanvasRenderingContext2D {
 // NOT IMPLEMENTED  boolean drawCustomFocusRing(Path path, Element element);
 // NOT IMPLEMENTED  void scrollPathIntoView();
 // NOT IMPLEMENTED  void scrollPathIntoView(Path path);
   void clip();
 // NOT IMPLEMENTED  void clip(Path path);
 // NOT IMPLEMENTED  void resetClip();
   boolean isPointInPath(unrestricted double x, unrestricted double y);
 // NOT IMPLEMENTED  boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
+  boolean isPointInStroke(double x, double y);
 
   // text (see also the CanvasDrawingStyles interface)
   [Throws, LenientFloat]
   void fillText(DOMString text, double x, double y, optional double maxWidth);
   [Throws, LenientFloat]
   void strokeText(DOMString text, double x, double y, optional double maxWidth);
   [Throws]
   TextMetrics measureText(DOMString text);
@@ -146,18 +147,16 @@ interface CanvasRenderingContext2D {
 
   [SetterThrows]
   attribute DOMString mozTextStyle;
 
   // image smoothing mode -- if disabled, images won't be smoothed
   // if scaled.
   attribute boolean mozImageSmoothingEnabled;
 
-  boolean mozIsPointInStroke(unrestricted double x, unrestricted double y);
-
   // Show the caret if appropriate when drawing
   [ChromeOnly]
   const unsigned long DRAWWINDOW_DRAW_CARET   = 0x01;
   // Don't flush pending layout notifications that could otherwise
   // be batched up
   [ChromeOnly]
   const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02;
   // Draw scrollbars and scroll the viewport if they are present