Inserts the specified node into this node's parent's children right before this node, assuming the specified node is clean (doesn't have preexisting relationships to other nodes). @param node the node to insert before this node
(final DomNode node)
| 1033 | * @param node the node to insert before this node |
| 1034 | */ |
| 1035 | private void basicInsertBefore(final DomNode node) { |
| 1036 | // try to make the node setup as complete as possible |
| 1037 | // before the node is reachable |
| 1038 | node.setPage(page_); |
| 1039 | node.parent_ = parent_; |
| 1040 | node.previousSibling_ = previousSibling_; |
| 1041 | node.nextSibling_ = this; |
| 1042 | |
| 1043 | if (parent_.firstChild_ == this) { |
| 1044 | parent_.firstChild_ = node; |
| 1045 | } |
| 1046 | else { |
| 1047 | previousSibling_.nextSibling_ = node; |
| 1048 | } |
| 1049 | previousSibling_ = node; |
| 1050 | } |
| 1051 | |
| 1052 | private void fireAddition(final DomNode domNode) { |
| 1053 | final boolean wasAlreadyAttached = domNode.isAttachedToPage(); |
no test coverage detected