Index: Source/WebCore/rendering/svg/RenderSVGModelObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (revision 122148) |
+++ Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (working copy) |
@@ -171,8 +171,10 @@ |
if (!isGraphicsElement(renderer)) |
return false; |
AffineTransform ctm; |
- getElementCTM(static_cast<SVGElement*>(renderer->node()), ctm); |
- return intersectsAllowingEmpty(rect, ctm.mapRect(renderer->repaintRectInLocalCoordinates())); |
+ SVGElement* svgElement = static_cast<SVGElement*>(renderer->node()); |
+ getElementCTM(svgElement, ctm); |
+ ASSERT(svgElement->renderer()); |
+ return intersectsAllowingEmpty(rect, ctm.mapRect(svgElement->renderer()->repaintRectInLocalCoordinates())); |
} |
bool RenderSVGModelObject::checkEnclosure(RenderObject* renderer, const FloatRect& rect) |
@@ -182,8 +184,10 @@ |
if (!isGraphicsElement(renderer)) |
return false; |
AffineTransform ctm; |
- getElementCTM(static_cast<SVGElement*>(renderer->node()), ctm); |
- return rect.contains(ctm.mapRect(renderer->repaintRectInLocalCoordinates())); |
+ SVGElement* svgElement = static_cast<SVGElement*>(renderer->node()); |
+ getElementCTM(svgElement, ctm); |
+ ASSERT(svgElement->renderer()); |
+ return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalCoordinates())); |
} |
} // namespace WebCore |