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

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

Issue 192133002: Use isSVG*Element() helpers more in SVG code (Part 1) (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
« no previous file with comments | « no previous file | Source/core/svg/SVGAltGlyphElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAltGlyphDefElement.cpp
diff --git a/Source/core/svg/SVGAltGlyphDefElement.cpp b/Source/core/svg/SVGAltGlyphDefElement.cpp
index 5142195a8a3f401c8ee75bed90187fffdc81b373..c72543fa19d4edbdde9ee57ba39433195e878c07 100644
--- a/Source/core/svg/SVGAltGlyphDefElement.cpp
+++ b/Source/core/svg/SVGAltGlyphDefElement.cpp
@@ -23,6 +23,7 @@
#include "core/svg/SVGAltGlyphDefElement.h"
#include "SVGNames.h"
+#include "core/dom/ElementTraversal.h"
#include "core/svg/SVGAltGlyphItemElement.h"
#include "core/svg/SVGGlyphRefElement.h"
@@ -88,8 +89,8 @@ bool SVGAltGlyphDefElement::hasValidGlyphElements(Vector<AtomicString>& glyphNam
bool fountFirstGlyphRef = false;
bool foundFirstAltGlyphItem = false;
- for (Node* child = firstChild(); child; child = child->nextSibling()) {
- if (!foundFirstAltGlyphItem && child->hasTagName(SVGNames::glyphRefTag)) {
+ for (SVGElement* child = Traversal<SVGElement>::firstChild(*this); child; child = Traversal<SVGElement>::nextSibling(*child)) {
+ if (!foundFirstAltGlyphItem && isSVGGlyphRefElement(*child)) {
fountFirstGlyphRef = true;
AtomicString referredGlyphName;
@@ -103,7 +104,7 @@ bool SVGAltGlyphDefElement::hasValidGlyphElements(Vector<AtomicString>& glyphNam
glyphNames.clear();
return false;
}
- } else if (!fountFirstGlyphRef && child->hasTagName(SVGNames::altGlyphItemTag)) {
+ } else if (!fountFirstGlyphRef && isSVGAltGlyphItemElement(*child)) {
foundFirstAltGlyphItem = true;
Vector<AtomicString> referredGlyphNames;
« no previous file with comments | « no previous file | Source/core/svg/SVGAltGlyphElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698