Index: Source/core/dom/TreeWalker.cpp |
diff --git a/Source/core/dom/TreeWalker.cpp b/Source/core/dom/TreeWalker.cpp |
index 805e48d753657551140edb7f5a91f26d4f7e3cfc..e85017ab8950473e3d60bc3b4eedc48adabcfe41 100644 |
--- a/Source/core/dom/TreeWalker.cpp |
+++ b/Source/core/dom/TreeWalker.cpp |
@@ -82,7 +82,7 @@ Node* TreeWalker::firstChild(ExceptionState& exceptionState) |
m_current = node.release(); |
return m_current.get(); |
case NodeFilter::FILTER_SKIP: |
- if (node->firstChild()) { |
+ if (node->hasChildren()) { |
node = node->firstChild(); |
continue; |
} |
@@ -189,7 +189,7 @@ Node* TreeWalker::nextSibling(ExceptionState& exceptionState) |
m_current = sibling.release(); |
return m_current.get(); |
case NodeFilter::FILTER_SKIP: |
- if (sibling->firstChild()) { |
+ if (sibling->hasChildren()) { |
sibling = sibling->firstChild(); |
node = sibling; |
continue; |