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

Unified Diff: Source/core/svg/SVGPatternElement.cpp

Issue 192143002: Use isSVG*Element() helpers more in SVG code (Part 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
« no previous file with comments | « Source/core/svg/SVGPathElement.cpp ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPatternElement.cpp
diff --git a/Source/core/svg/SVGPatternElement.cpp b/Source/core/svg/SVGPatternElement.cpp
index 9153a2f8fb72ad23776976676f8efb295c936bb8..fa6db5cd4f5a454a45bf7a25a58a142d39bb246e 100644
--- a/Source/core/svg/SVGPatternElement.cpp
+++ b/Source/core/svg/SVGPatternElement.cpp
@@ -192,8 +192,8 @@ void SVGPatternElement::collectPatternAttributes(PatternAttributes& attributes)
// Respect xlink:href, take attributes from referenced element
Node* refNode = SVGURIReference::targetElementFromIRIString(current->hrefString(), document());
- if (refNode && refNode->hasTagName(SVGNames::patternTag)) {
- current = toSVGPatternElement(const_cast<const Node*>(refNode));
+ if (isSVGPatternElement(refNode)) {
+ current = toSVGPatternElement(refNode);
// Cycle detection
if (processedPatterns.contains(current))
« no previous file with comments | « Source/core/svg/SVGPathElement.cpp ('k') | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698