+
+
+
+diff --git a/dom/svg/test/mochitest.ini b/dom/svg/test/mochitest.ini index 626075349dc6..6491e5dd3c75 100644 --- a/dom/svg/test/mochitest.ini +++ b/dom/svg/test/mochitest.ini @@ -64,6 +64,7 @@ skip-if = true [test_pointer-events-4.xhtml] [test_pointer-events-5.xhtml] [test_pointer-events-6.xhtml] +[test_pointer-events-7.xhtml] [test_scientific.html] [test_selectSubString.xhtml] [test_stroke-linecap-hit-testing.xhtml] diff --git a/dom/svg/test/test_pointer-events-7.xhtml b/dom/svg/test/test_pointer-events-7.xhtml new file mode 100644 index 000000000000..3ac95cb303c3 --- /dev/null +++ b/dom/svg/test/test_pointer-events-7.xhtml @@ -0,0 +1,66 @@ + + +
+++ + diff --git a/layout/svg/nsSVGImageFrame.cpp b/layout/svg/nsSVGImageFrame.cpp index 8beaf89718f4..b5bafc965864 100644 --- a/layout/svg/nsSVGImageFrame.cpp +++ b/layout/svg/nsSVGImageFrame.cpp @@ -410,6 +410,10 @@ nsSVGImageFrame::PaintSVG(gfxContext& aContext, nsIFrame* nsSVGImageFrame::GetFrameForPoint(const gfxPoint& aPoint) { + if (!(GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) && !GetHitTestFlags()) { + return nullptr; + } + Rect rect; SVGImageElement *element = static_cast