2006-09-27 Eric Seidel <eric@eseidel.com>
[WebKit-https.git] / WebCore / kcanvas / RenderPath.cpp
index 031d533a370bf3d44c3122f3c38beb03a078b7a7..2d680f13b02b2dea3f97dc9d5e1bc5dfccf76a55 100644 (file)
@@ -294,11 +294,9 @@ bool RenderPath::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, H
     
     bool isVisible = (style()->visibility() == VISIBLE);
     if (isVisible || !hitRules.requireVisible) {
-        bool hasFill = (style()->svgStyle()->fillPaint() && style()->svgStyle()->fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE);
-        bool hasStroke = (style()->svgStyle()->strokePaint() && style()->svgStyle()->strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE);
         FloatPoint hitPoint(_x,_y);
-        if ((hitRules.canHitStroke && (hasStroke || !hitRules.requireStroke) && strokeContains(hitPoint, hitRules.requireStroke))
-            || (hitRules.canHitFill && (hasFill || !hitRules.requireFill) && fillContains(hitPoint, hitRules.requireFill))) {
+        if ((hitRules.canHitStroke && (KSVGPainterFactory::isStroked(style()) || !hitRules.requireStroke) && strokeContains(hitPoint, hitRules.requireStroke))
+            || (hitRules.canHitFill && (KSVGPainterFactory::isFilled(style()) || !hitRules.requireFill) && fillContains(hitPoint, hitRules.requireFill))) {
             setInnerNode(info);
             return true;
         }