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

Unified Diff: Source/core/dom/Node.cpp

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/accessibility/AXRenderObject.cpp ('k') | Source/core/dom/NodeTraversal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index dad59a8555c06933c6fb76ae84ec546c98e8d15e..537434fa67a3bc324b040a6f053f768754645a83 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -432,7 +432,7 @@ Node* Node::pseudoAwareNextSibling() const
{
if (parentElement() && !nextSibling()) {
Element* parent = parentElement();
- if (isBeforePseudoElement() && parent->firstChild())
+ if (isBeforePseudoElement() && parent->hasChildren())
return parent->firstChild();
if (!isAfterPseudoElement())
return parent->pseudoElement(AFTER);
@@ -1057,7 +1057,7 @@ Node *Node::previousNodeConsideringAtomicNodes() const
Node *Node::nextNodeConsideringAtomicNodes() const
{
- if (!isAtomicNode(this) && firstChild())
+ if (!isAtomicNode(this) && hasChildren())
return firstChild();
if (nextSibling())
return nextSibling();
« no previous file with comments | « Source/core/accessibility/AXRenderObject.cpp ('k') | Source/core/dom/NodeTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698