diff --git a/dom/svg/test/mochitest.ini b/dom/svg/test/mochitest.ini index 50e5047611b..4e43b90f1c7 100644 --- a/dom/svg/test/mochitest.ini +++ b/dom/svg/test/mochitest.ini @@ -70,6 +70,7 @@ skip-if = android_version == '18' # bug 1147994 [test_pointer-events-7.xhtml] [test_scientific.html] [test_selectSubString.xhtml] +[test_stroke-hit-testing.xhtml] [test_stroke-linecap-hit-testing.xhtml] [test_SVGLengthList-2.xhtml] [test_SVGLengthList.xhtml] diff --git a/dom/svg/test/test_stroke-hit-testing.xhtml b/dom/svg/test/test_stroke-hit-testing.xhtml new file mode 100644 index 00000000000..04021905ec2 --- /dev/null +++ b/dom/svg/test/test_stroke-hit-testing.xhtml @@ -0,0 +1,67 @@ + + + + Test hit-testing of stroke + + + + + + +Mozilla Bug 676001 +

+
+ +
+ + + + + + +
+
+
+ + diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c index 1f672242ad9..cb07b511f2b 100644 --- a/gfx/cairo/cairo/src/cairo-gstate.c +++ b/gfx/cairo/cairo/src/cairo-gstate.c @@ -1213,8 +1213,8 @@ _cairo_gstate_in_stroke (cairo_gstate_t *gstate, limit.p1.x = _cairo_fixed_from_double (x) - 5; limit.p1.y = _cairo_fixed_from_double (y) - 5; - limit.p2.x = limit.p1.x + 5; - limit.p2.y = limit.p1.y + 5; + limit.p2.x = limit.p1.x + 10; + limit.p2.y = limit.p1.y + 10; _cairo_traps_init (&traps); _cairo_traps_limit (&traps, &limit, 1); diff --git a/gfx/cairo/cairo/src/cairo-polygon.c b/gfx/cairo/cairo/src/cairo-polygon.c index 64fef47e1e4..1b5fab02bae 100644 --- a/gfx/cairo/cairo/src/cairo-polygon.c +++ b/gfx/cairo/cairo/src/cairo-polygon.c @@ -252,13 +252,10 @@ _add_clipped_edge (cairo_polygon_t *polygon, right_y = _cairo_edge_compute_intersection_y_for_x (p1, p2, limits->p2.x); - if (left_y == right_y) /* horizontal within bounds */ - continue; - p1_y = top; p2_y = bottom; - if (left_y < right_y) { + if (p1->x < p2->x) { if (p1->x < limits->p1.x && left_y > limits->p1.y) { p[0].x = limits->p1.x; p[0].y = limits->p1.y;