Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Unified Diff: Source/core/rendering/svg/RenderSVGResourceClipper.cpp

Issue 191003007: Use isSVG*Element() helpers more in SVG code (Part 3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « Source/core/rendering/svg/RenderSVGInline.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698