From ebe2130892abc570aa45f722b4e535a6886b573d Mon Sep 17 00:00:00 2001 From: "jwatt%jwatt.org" Date: Fri, 26 May 2006 16:01:44 +0000 Subject: [PATCH] Partial fix for bug 338580. Improve SVG hittesting performance. Patched by Alex Fritze . r=jwatt@jwatt.org, sr=tor@acm.org --- layout/svg/renderer/src/cairo/nsSVGCairoGlyphGeometry.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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; {