Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / TreeWalker.cpp
index dfa29d5..e85017a 100644 (file)
 #include "config.h"
 #include "core/dom/TreeWalker.h"
 
-#include "bindings/v8/ExceptionMessages.h"
-#include "bindings/v8/ExceptionState.h"
+#include "bindings/core/v8/ExceptionMessages.h"
+#include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ContainerNode.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/NodeTraversal.h"
 
-namespace WebCore {
+namespace blink {
 
 TreeWalker::TreeWalker(PassRefPtrWillBeRawPtr<Node> rootNode, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter)
     : NodeIteratorBase(rootNode, whatToShow, filter)
@@ -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;
@@ -283,4 +283,4 @@ void TreeWalker::trace(Visitor* visitor)
     NodeIteratorBase::trace(visitor);
 }
 
-} // namespace WebCore
+} // namespace blink