Lines Matching defs:refChild
136 void CompositeEditCommand::insertNodeBefore(PassRefPtr<Node> insertChild, PassRefPtr<Node> refChild)
138 ASSERT(!refChild->hasTagName(bodyTag));
139 applyCommandToComposite(InsertNodeBeforeCommand::create(insertChild, refChild));
142 void CompositeEditCommand::insertNodeAfter(PassRefPtr<Node> insertChild, PassRefPtr<Node> refChild)
145 ASSERT(refChild);
146 ASSERT(!refChild->hasTagName(bodyTag));
147 ContainerNode* parent = refChild->parentNode();
149 if (parent->lastChild() == refChild)
152 ASSERT(refChild->nextSibling());
153 insertNodeBefore(insertChild, refChild->nextSibling());
163 Node* refChild = p.deprecatedNode();
166 if (canHaveChildrenForEditing(refChild)) {
167 Node* child = refChild->firstChild();
173 appendNode(insertChild, static_cast<Element*>(refChild));
174 } else if (caretMinOffset(refChild) >= offset)
175 insertNodeBefore(insertChild, refChild);
176 else if (refChild->isTextNode() && caretMaxOffset(refChild) > offset) {
177 splitTextNode(static_cast<Text *>(refChild), offset);
179 // Mutation events (bug 22634) from the text node insertion may have removed the refChild
180 if (!refChild->inDocument())
182 insertNodeBefore(insertChild, refChild);
184 insertNodeAfter(insertChild, refChild);