mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
return oldChild not newChild when replacing with a docfragment
This commit is contained in:
parent
6c749609c0
commit
90156036c0
1 changed files with 3 additions and 3 deletions
|
@ -334,13 +334,13 @@ class NodeImplWithChildren : public NodeImpl<stringT, string_adaptorT>,
|
|||
return 0;
|
||||
} // getLastChild
|
||||
|
||||
virtual DOMNode_implT* insertBefore(DOMNode_implT*newChild, DOMNode_implT*refChild)
|
||||
virtual DOMNode_implT* insertBefore(DOMNode_implT* newChild, DOMNode_implT* refChild)
|
||||
{
|
||||
return do_insertBefore(dynamic_cast<NodeImplT*>(newChild),
|
||||
dynamic_cast<NodeImplT*>(refChild));
|
||||
} // insertBefore
|
||||
|
||||
virtual DOMNode_implT* replaceChild(DOMNode_implT*newChild, DOMNode_implT*oldChild)
|
||||
virtual DOMNode_implT* replaceChild(DOMNode_implT* newChild, DOMNode_implT* oldChild)
|
||||
{
|
||||
return do_replaceChild(dynamic_cast<NodeImplT*>(newChild),
|
||||
dynamic_cast<NodeImplT*>(oldChild));
|
||||
|
@ -435,7 +435,7 @@ class NodeImplWithChildren : public NodeImpl<stringT, string_adaptorT>,
|
|||
DOMNode_implT* lc = newChild->getLastChild();
|
||||
replaceChild(newChild->removeChild(lc), oldChild);
|
||||
insertBefore(newChild, lc);
|
||||
return newChild;
|
||||
return oldChild;
|
||||
} // if ...
|
||||
|
||||
checkCanAdd(newChild);
|
||||
|
|
Loading…
Reference in a new issue