Lines Matching refs:parentNode

134 static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fragment)  in dom_fragment_assign_parent_node()  argument
139 node->parent = parentNode; in dom_fragment_assign_parent_node()
237 …e_insert_valid_without_step_1(php_libxml_ref_obj *document, xmlNodePtr parentNode, xmlNodePtr node… in dom_is_pre_insert_valid_without_step_1() argument
239 ZEND_ASSERT(parentNode != NULL); in dom_is_pre_insert_valid_without_step_1()
243 if (php_dom_pre_insert_is_parent_invalid(parentNode)) { in dom_is_pre_insert_valid_without_step_1()
254 if (child != NULL && child->parent != parentNode) { in dom_is_pre_insert_valid_without_step_1()
259 …bool parent_is_document = parentNode->type == XML_DOCUMENT_NODE || parentNode->type == XML_HTML_DO… in dom_is_pre_insert_valid_without_step_1()
262 dom_hierarchy(parentNode, node) != SUCCESS in dom_is_pre_insert_valid_without_step_1()
294 if (!php_dom_fragment_insertion_hierarchy_check_pre_insertion(parentNode, node, child)) { in dom_is_pre_insert_valid_without_step_1()
301 if (php_dom_has_child_of_type(parentNode, XML_ELEMENT_NODE)) { in dom_is_pre_insert_valid_without_step_1()
313 if (php_dom_has_child_of_type(parentNode, XML_DTD_NODE)) { in dom_is_pre_insert_valid_without_step_1()
318 || (child == NULL && php_dom_has_child_of_type(parentNode, XML_ELEMENT_NODE))) { in dom_is_pre_insert_valid_without_step_1()
462 static void php_dom_pre_insert_helper(xmlNodePtr insertion_point, xmlNodePtr parentNode, xmlNodePtr… in php_dom_pre_insert_helper() argument
466 if (parentNode->children) { in php_dom_pre_insert_helper()
468 newchild->prev = parentNode->last; in php_dom_pre_insert_helper()
469 parentNode->last->next = newchild; in php_dom_pre_insert_helper()
472 parentNode->children = newchild; in php_dom_pre_insert_helper()
474 parentNode->last = last; in php_dom_pre_insert_helper()
483 if (parentNode->children == insertion_point) { in php_dom_pre_insert_helper()
484 parentNode->children = newchild; in php_dom_pre_insert_helper()
589 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_append() local
594 xmlNodePtr node = dom_zvals_to_single_node(context->document, parentNode, nodes, nodesc); in dom_parent_node_append()
600 php_dom_node_append(context->document, node, parentNode); in dom_parent_node_append()
606 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_prepend() local
608 if (parentNode->children == NULL) { in dom_parent_node_prepend()
620 xmlNodePtr node = dom_zvals_to_single_node(context->document, parentNode, nodes, nodesc); in dom_parent_node_prepend()
626 php_dom_pre_insert(context->document, node, parentNode, parentNode->children); in dom_parent_node_prepend()
639 xmlNodePtr parentNode = thisp->parent; in dom_parent_node_after() local
642 if (UNEXPECTED(parentNode == NULL)) { in dom_parent_node_after()
655 xmlNodePtr fragment = dom_zvals_to_single_node(context->document, parentNode, nodes, nodesc); in dom_parent_node_after()
658 php_dom_pre_insert(context->document, fragment, parentNode, viable_next_sibling); in dom_parent_node_after()
671 xmlNodePtr parentNode = thisp->parent; in dom_parent_node_before() local
674 if (UNEXPECTED(parentNode == NULL)) { in dom_parent_node_before()
687 xmlNodePtr fragment = dom_zvals_to_single_node(context->document, parentNode, nodes, nodesc); in dom_parent_node_before()
691 viable_previous_sibling = parentNode->children; in dom_parent_node_before()
697 php_dom_pre_insert(context->document, fragment, parentNode, viable_previous_sibling); in dom_parent_node_before()
739 xmlNodePtr parentNode = child->parent; in dom_child_replace_with() local
742 if (UNEXPECTED(parentNode == NULL)) { in dom_child_replace_with()
759 xmlNodePtr node = dom_zvals_to_single_node(context->document, parentNode, nodes, nodesc); in dom_child_replace_with()
765 …_pre_insert_valid_without_step_1(context->document, parentNode, node, viable_next_sibling, parentN… in dom_child_replace_with()
772 dom_insert_node_list_unchecked(context->document, node, parentNode, viable_next_sibling); in dom_child_replace_with()