Lines Matching refs:parentNode

234 static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fragment)  in dom_fragment_assign_parent_node()  argument
239 node->parent = parentNode; in dom_fragment_assign_parent_node()
251 …check_node_list_for_insertion(php_libxml_ref_obj *document, xmlNodePtr parentNode, zval *nodes, in… in dom_sanity_check_node_list_for_insertion() argument
253 if (UNEXPECTED(parentNode == NULL)) { in dom_sanity_check_node_list_for_insertion()
258 xmlDocPtr documentNode = dom_doc_from_context_node(parentNode); in dom_sanity_check_node_list_for_insertion()
278 if (node->type == XML_ATTRIBUTE_NODE || dom_hierarchy(parentNode, node) != SUCCESS) { in dom_sanity_check_node_list_for_insertion()
295 static void dom_pre_insert(xmlNodePtr insertion_point, xmlNodePtr parentNode, xmlNodePtr newchild, … in dom_pre_insert() argument
299 if (parentNode->children) { in dom_pre_insert()
301 newchild->prev = parentNode->last; in dom_pre_insert()
302 parentNode->last->next = newchild; in dom_pre_insert()
305 parentNode->children = newchild; in dom_pre_insert()
307 parentNode->last = fragment->last; in dom_pre_insert()
316 if (parentNode->children == insertion_point) { in dom_pre_insert()
317 parentNode->children = newchild; in dom_pre_insert()
324 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_append() local
327 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_append()
333 xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_append()
340 prevsib = parentNode->last; in dom_parent_node_append()
346 parentNode->children = newchild; in dom_parent_node_append()
350 parentNode->last = last; in dom_parent_node_append()
354 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_append()
356 dom_reconcile_ns_list(parentNode->doc, newchild, last); in dom_parent_node_append()
364 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_prepend() local
366 if (parentNode->children == NULL) { in dom_parent_node_prepend()
371 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_prepend()
377 xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_prepend()
388 dom_pre_insert(parentNode->children, parentNode, newchild, fragment); in dom_parent_node_prepend()
390 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_prepend()
392 dom_reconcile_ns_list(parentNode->doc, newchild, last); in dom_parent_node_prepend()
403 xmlNodePtr newchild, parentNode; in dom_parent_node_after() local
408 parentNode = prevsib->parent; in dom_parent_node_after()
411 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_after()
429 fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_after()
441 dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); in dom_parent_node_after()
443 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_after()
455 xmlNodePtr newchild, parentNode; in dom_parent_node_before() local
460 parentNode = nextsib->parent; in dom_parent_node_before()
463 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_before()
481 fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_before()
494 viable_previous_sibling = parentNode->children; in dom_parent_node_before()
499 dom_pre_insert(viable_previous_sibling, parentNode, newchild, fragment); in dom_parent_node_before()
501 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_before()
557 xmlNodePtr parentNode = child->parent; in dom_child_replace_with() local
560 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_child_replace_with()
578 xmlDocPtr doc = parentNode->doc; in dom_child_replace_with()
582 xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_child_replace_with()
600 dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); in dom_child_replace_with()
602 dom_fragment_assign_parent_node(parentNode, fragment); in dom_child_replace_with()