mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-18 22:26:32 +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;
|
return 0;
|
||||||
} // getLastChild
|
} // 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),
|
return do_insertBefore(dynamic_cast<NodeImplT*>(newChild),
|
||||||
dynamic_cast<NodeImplT*>(refChild));
|
dynamic_cast<NodeImplT*>(refChild));
|
||||||
} // insertBefore
|
} // 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),
|
return do_replaceChild(dynamic_cast<NodeImplT*>(newChild),
|
||||||
dynamic_cast<NodeImplT*>(oldChild));
|
dynamic_cast<NodeImplT*>(oldChild));
|
||||||
|
@ -435,7 +435,7 @@ class NodeImplWithChildren : public NodeImpl<stringT, string_adaptorT>,
|
||||||
DOMNode_implT* lc = newChild->getLastChild();
|
DOMNode_implT* lc = newChild->getLastChild();
|
||||||
replaceChild(newChild->removeChild(lc), oldChild);
|
replaceChild(newChild->removeChild(lc), oldChild);
|
||||||
insertBefore(newChild, lc);
|
insertBefore(newChild, lc);
|
||||||
return newChild;
|
return oldChild;
|
||||||
} // if ...
|
} // if ...
|
||||||
|
|
||||||
checkCanAdd(newChild);
|
checkCanAdd(newChild);
|
||||||
|
|
Loading…
Reference in a new issue