Index: Source/WebCore/rendering/svg/RenderSVGModelObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (revision 122147) |
+++ Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (working copy) |
@@ -166,8 +166,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) |
@@ -177,8 +179,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 |