• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/WebCore-7537.78.1/dom/

Lines Matching refs:newParent

145 static inline bool isChildTypeAllowed(ContainerNode* newParent, Node* child)
148 return newParent->childTypeAllowed(child->nodeType());
151 if (!newParent->childTypeAllowed(node->nodeType()))
168 static inline bool containsConsideringHostElements(const Node* newChild, const Node* newParent)
170 return (newParent->isInShadowTree() || isInTemplateContent(newParent))
171 ? newChild->containsIncludingHostElements(newParent)
172 : newChild->contains(newParent);
175 static inline ExceptionCode checkAcceptChild(ContainerNode* newParent, Node* newChild, Node* oldChild)
182 if ((newChild->isElementNode() || newChild->isTextNode()) && newParent->isElementNode()) {
183 ASSERT(!newParent->isReadOnlyNode());
184 ASSERT(!newParent->isDocumentTypeNode());
185 ASSERT(isChildTypeAllowed(newParent, newChild));
186 if (containsConsideringHostElements(newChild, newParent))
196 if (newParent->isReadOnlyNode())
200 if (containsConsideringHostElements(newChild, newParent))
203 if (oldChild && newParent->isDocumentNode()) {
204 if (!toDocument(newParent)->canReplaceChild(newChild, oldChild))
206 } else if (!isChildTypeAllowed(newParent, newChild))
212 static inline bool checkAcceptChildGuaranteedNodeTypes(ContainerNode* newParent, Node* newChild, ExceptionCode& ec)
214 ASSERT(!newParent->isReadOnlyNode());
215 ASSERT(!newParent->isDocumentTypeNode());
216 ASSERT(isChildTypeAllowed(newParent, newChild));
217 if (newChild->contains(newParent)) {
225 static inline bool checkAddChild(ContainerNode* newParent, Node* newChild, ExceptionCode& ec)
227 ec = checkAcceptChild(newParent, newChild, 0);
234 static inline bool checkReplaceChild(ContainerNode* newParent, Node* newChild, Node* oldChild, ExceptionCode& ec)
236 ec = checkAcceptChild(newParent, newChild, oldChild);