Lines Matching refs:parentNode
227 static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fragment) in dom_fragment_assign_parent_node() argument
232 node->parent = parentNode; in dom_fragment_assign_parent_node()
244 …check_node_list_for_insertion(php_libxml_ref_obj *document, xmlNodePtr parentNode, zval *nodes, in… in dom_sanity_check_node_list_for_insertion() argument
251 xmlDocPtr documentNode = dom_doc_from_context_node(parentNode); in dom_sanity_check_node_list_for_insertion()
266 if (node->type == XML_ATTRIBUTE_NODE || dom_hierarchy(parentNode, node) != SUCCESS) { in dom_sanity_check_node_list_for_insertion()
283 static void dom_pre_insert(xmlNodePtr insertion_point, xmlNodePtr parentNode, xmlNodePtr newchild, … in dom_pre_insert() argument
287 if (parentNode->children) { in dom_pre_insert()
289 newchild->prev = parentNode->last; in dom_pre_insert()
290 parentNode->last->next = newchild; in dom_pre_insert()
293 parentNode->children = newchild; in dom_pre_insert()
295 parentNode->last = fragment->last; in dom_pre_insert()
304 if (parentNode->children == insertion_point) { in dom_pre_insert()
305 parentNode->children = newchild; in dom_pre_insert()
312 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_append() local
315 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_append()
319 xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_append()
326 prevsib = parentNode->last; in dom_parent_node_append()
332 parentNode->children = newchild; in dom_parent_node_append()
336 parentNode->last = last; in dom_parent_node_append()
340 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_append()
342 dom_reconcile_ns_list(parentNode->doc, newchild, last); in dom_parent_node_append()
350 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_prepend() local
352 if (parentNode->children == NULL) { in dom_parent_node_prepend()
357 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_prepend()
361 xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_prepend()
372 dom_pre_insert(parentNode->children, parentNode, newchild, fragment); in dom_parent_node_prepend()
374 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_prepend()
376 dom_reconcile_ns_list(parentNode->doc, newchild, last); in dom_parent_node_prepend()
387 xmlNodePtr newchild, parentNode; in dom_parent_node_after() local
392 parentNode = prevsib->parent; in dom_parent_node_after()
394 if (!parentNode) { 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()
416 fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_after()
428 dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); in dom_parent_node_after()
430 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_after()
442 xmlNodePtr newchild, parentNode; in dom_parent_node_before() local
447 parentNode = nextsib->parent; in dom_parent_node_before()
449 if (!parentNode) { in dom_parent_node_before()
466 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_parent_node_before()
471 fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_parent_node_before()
484 viable_previous_sibling = parentNode->children; in dom_parent_node_before()
489 dom_pre_insert(viable_previous_sibling, parentNode, newchild, fragment); in dom_parent_node_before()
491 dom_fragment_assign_parent_node(parentNode, fragment); in dom_parent_node_before()
555 xmlNodePtr parentNode = child->parent; in dom_child_replace_with() local
557 if (!parentNode) { in dom_child_replace_with()
577 …if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, node… in dom_child_replace_with()
582 xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); in dom_child_replace_with()
590 xmlDocPtr doc = parentNode->doc; 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()