#include "core/dom/Element.h"
#include "core/dom/NodeRareData.h"
-namespace WebCore {
+namespace blink {
ChildNodeList::ChildNodeList(ContainerNode& parent)
: m_parent(parent)
Node* ChildNodeList::traverseForwardToOffset(unsigned offset, Node& currentNode, unsigned& currentOffset) const
{
ASSERT(currentOffset < offset);
- Node* next = ¤tNode;
- while ((next = next->nextSibling())) {
+ for (Node* next = currentNode.nextSibling(); next; next = next->nextSibling()) {
if (++currentOffset == offset)
return next;
}
Node* ChildNodeList::traverseBackwardToOffset(unsigned offset, Node& currentNode, unsigned& currentOffset) const
{
ASSERT(currentOffset > offset);
- Node* previous = ¤tNode;
- while ((previous = previous->previousSibling())) {
+ for (Node* previous = currentNode.previousSibling(); previous; previous = previous->previousSibling()) {
if (--currentOffset == offset)
return previous;
}
NodeList::trace(visitor);
}
-} // namespace WebCore
+} // namespace blink