Lines Matching refs:parentNode

241 static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fragment)  in dom_fragment_assign_parent_node()  argument
246 node->parent = parentNode; in dom_fragment_assign_parent_node()
258 …check_node_list_for_insertion(php_libxml_ref_obj *document, xmlNodePtr parentNode, zval *nodes, in… in dom_sanity_check_node_list_for_insertion() argument
265 xmlDocPtr documentNode = dom_doc_from_context_node(parentNode); in dom_sanity_check_node_list_for_insertion()
285 if (node->type == XML_ATTRIBUTE_NODE || dom_hierarchy(parentNode, node) != SUCCESS) { in dom_sanity_check_node_list_for_insertion()
302 static void dom_pre_insert(xmlNodePtr insertion_point, xmlNodePtr parentNode, xmlNodePtr newchild, … in dom_pre_insert() argument
306 if (parentNode->children) { in dom_pre_insert()
308 newchild->prev = parentNode->last; in dom_pre_insert()
309 parentNode->last->next = newchild; in dom_pre_insert()
312 parentNode->children = newchild; in dom_pre_insert()
314 parentNode->last = fragment->last; in dom_pre_insert()
323 if (parentNode->children == insertion_point) { in dom_pre_insert()
324 parentNode->children = newchild; in dom_pre_insert()
331 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_append() local
334 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_append()
338 xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_append()
345 prevsib = parentNode->last; in dom_parent_node_append()
351 parentNode->children = newchild; in dom_parent_node_append()
355 parentNode->last = last; in dom_parent_node_append()
359 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_append()
361 dom_reconcile_ns_list(parentNode->doc, newchild, last); in dom_parent_node_append()
369 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_prepend() local
371 if (parentNode->children == NULL) { in dom_parent_node_prepend()
376 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_prepend()
380 xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_prepend()
391 dom_pre_insert(parentNode->children, parentNode, newchild, fragment); in dom_parent_node_prepend()
393 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_prepend()
395 dom_reconcile_ns_list(parentNode->doc, newchild, last); in dom_parent_node_prepend()
406 xmlNodePtr newchild, parentNode; in dom_parent_node_after() local
411 parentNode = prevsib->parent; in dom_parent_node_after()
413 if (!parentNode) { in dom_parent_node_after()
430 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_after()
435 fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_after()
447 dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); in dom_parent_node_after()
449 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_after()
461 xmlNodePtr newchild, parentNode; in dom_parent_node_before() local
466 parentNode = nextsib->parent; in dom_parent_node_before()
468 if (!parentNode) { in dom_parent_node_before()
485 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_before()
490 fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_before()
503 viable_previous_sibling = parentNode->children; in dom_parent_node_before()
508 dom_pre_insert(viable_previous_sibling, parentNode, newchild, fragment); in dom_parent_node_before()
510 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_before()
574 xmlNodePtr parentNode = child->parent; in dom_child_replace_with() local
576 if (!parentNode) { in dom_child_replace_with()
596 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_child_replace_with()
601 xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_child_replace_with()
609 xmlDocPtr doc = parentNode->doc; in dom_child_replace_with()
619 dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); in dom_child_replace_with()
621 dom_fragment_assign_parent_node(parentNode, fragment); in dom_child_replace_with()