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

Unified Diff: Source/core/dom/NodeTraversal.h

Issue 428533006: Use ContainerNode::hasChildren() instead of firstChild() in conditionals (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: build fix Created 6 years, 5 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/dom/Node.cpp ('k') | Source/core/dom/Position.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeTraversal.h
diff --git a/Source/core/dom/NodeTraversal.h b/Source/core/dom/NodeTraversal.h
index a3dbe6ed57f75c3530b24ad318694325a7c1d3c9..c82aff81483c0c4d40c30bbaccc8bf0f53d86afa 100644
--- a/Source/core/dom/NodeTraversal.h
+++ b/Source/core/dom/NodeTraversal.h
@@ -76,7 +76,7 @@ private:
template <class NodeType>
inline Node* NodeTraversal::traverseNextTemplate(NodeType& current)
{
- if (current.firstChild())
+ if (current.hasChildren())
return current.firstChild();
if (current.nextSibling())
return current.nextSibling();
@@ -86,7 +86,7 @@ inline Node* NodeTraversal::traverseNextTemplate(NodeType& current)
template <class NodeType>
inline Node* NodeTraversal::traverseNextTemplate(NodeType& current, const Node* stayWithin)
{
- if (current.firstChild())
+ if (current.hasChildren())
return current.firstChild();
if (current == stayWithin)
return 0;
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698