// This only makes a shallow copy, cloneChildren must also be called for a // deep clone ChildNode::ChildNode(const ChildNode &other) : NodeImpl(other) { // Need to break the association w/ original siblings and parent this->previousSibling = null; this->nextSibling = null; isFirstChild(false); }
NodeImpl * ChildNode::getPreviousSibling() { // if we are the firstChild, previousSibling actually refers to our // parent's lastChild, but we hide that return isFirstChild() ? null : previousSibling; }
ChildNode * _previousSibling() const { return isFirstChild() ? 0 : previousSibling; }