Index: Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
index 31c7746f2090797f59dc308b7c20c141d5d1f727..3c7b67d2766e05a3ae00fa79b0ac854abc7f9d1f 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
@@ -281,13 +281,13 @@ PassRefPtr<DisplayList> RenderSVGResourceClipper::asDisplayList(GraphicsContext* |
continue; |
WindRule newClipRule = style->svgStyle()->clipRule(); |
- bool isUseElement = childElement->hasTagName(SVGNames::useTag); |
+ bool isUseElement = isSVGUseElement(*childElement); |
if (isUseElement) { |
- SVGUseElement* useElement = toSVGUseElement(childElement); |
- renderer = useElement->rendererClipChild(); |
+ SVGUseElement& useElement = toSVGUseElement(*childElement); |
+ renderer = useElement.rendererClipChild(); |
if (!renderer) |
continue; |
- if (!useElement->hasAttribute(SVGNames::clip_ruleAttr)) |
+ if (!useElement.hasAttribute(SVGNames::clip_ruleAttr)) |
newClipRule = renderer->style()->svgStyle()->clipRule(); |
} |
@@ -315,7 +315,7 @@ void RenderSVGResourceClipper::calculateClipContentRepaintRect() |
RenderObject* renderer = childElement->renderer(); |
if (!renderer) |
continue; |
- if (!renderer->isSVGShape() && !renderer->isSVGText() && !childElement->hasTagName(SVGNames::useTag)) |
+ if (!renderer->isSVGShape() && !renderer->isSVGText() && !isSVGUseElement(*childElement)) |
continue; |
RenderStyle* style = renderer->style(); |
if (!style || style->display() == NONE || style->visibility() != VISIBLE) |
@@ -345,7 +345,7 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin |
RenderObject* renderer = childElement->renderer(); |
if (!renderer) |
continue; |
- if (!renderer->isSVGShape() && !renderer->isSVGText() && !childElement->hasTagName(SVGNames::useTag)) |
+ if (!renderer->isSVGShape() && !renderer->isSVGText() && !isSVGUseElement(*childElement)) |
continue; |
IntPoint hitPoint; |
HitTestResult result(hitPoint); |