diff --git a/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp b/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp index a4d12e0e2fc..8947ab6c669 100644 --- a/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp +++ b/layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp @@ -384,6 +384,13 @@ nsSVGCairoGlyphGeometry::ContainsPoint(nsSVGGlyphFrame *aSource, { *_retval = PR_FALSE; + // early reject test + if (mCoveredRegion) { + nsCOMPtr region = do_QueryInterface(mCoveredRegion); + if (!region->Contains(x,y)) + return NS_OK; + } + /* get the metrics */ nsCOMPtr metrics; {