This commit is contained in:
jfrancis%netscape.com 1999-09-10 23:30:35 +00:00
Родитель 7ac8208271
Коммит 2408eadfce
2 изменённых файлов: 22 добавлений и 18 удалений

Просмотреть файл

@ -73,18 +73,20 @@ NS_IMETHODIMP JoinElementTxn::Do(void)
{
mParent= do_QueryInterface(leftParent); // set this instance mParent.
// Other methods will see a non-null mParent and know all is well
nsCOMPtr<nsIDOMNodeList> childNodes;
result = mLeftNode->GetChildNodes(getter_AddRefs(childNodes));
if (NS_FAILED(result)) return result;
if (childNodes) {
childNodes->GetLength(&mOffset);
nsCOMPtr<nsIDOMCharacterData> leftNodeAsText;
leftNodeAsText = do_QueryInterface(mLeftNode);
if (leftNodeAsText)
{
leftNodeAsText->GetLength(&mOffset);
}
else
{
nsCOMPtr<nsIDOMCharacterData> leftNodeAsText;
leftNodeAsText = do_QueryInterface(mLeftNode);
if (leftNodeAsText) {
leftNodeAsText->GetLength(&mOffset);
nsCOMPtr<nsIDOMNodeList> childNodes;
result = mLeftNode->GetChildNodes(getter_AddRefs(childNodes));
if (NS_FAILED(result)) return result;
if (childNodes)
{
childNodes->GetLength(&mOffset);
}
}
result = nsEditor::JoinNodesImpl(mRightNode, mLeftNode, mParent, PR_FALSE);

Просмотреть файл

@ -73,18 +73,20 @@ NS_IMETHODIMP JoinElementTxn::Do(void)
{
mParent= do_QueryInterface(leftParent); // set this instance mParent.
// Other methods will see a non-null mParent and know all is well
nsCOMPtr<nsIDOMNodeList> childNodes;
result = mLeftNode->GetChildNodes(getter_AddRefs(childNodes));
if (NS_FAILED(result)) return result;
if (childNodes) {
childNodes->GetLength(&mOffset);
nsCOMPtr<nsIDOMCharacterData> leftNodeAsText;
leftNodeAsText = do_QueryInterface(mLeftNode);
if (leftNodeAsText)
{
leftNodeAsText->GetLength(&mOffset);
}
else
{
nsCOMPtr<nsIDOMCharacterData> leftNodeAsText;
leftNodeAsText = do_QueryInterface(mLeftNode);
if (leftNodeAsText) {
leftNodeAsText->GetLength(&mOffset);
nsCOMPtr<nsIDOMNodeList> childNodes;
result = mLeftNode->GetChildNodes(getter_AddRefs(childNodes));
if (NS_FAILED(result)) return result;
if (childNodes)
{
childNodes->GetLength(&mOffset);
}
}
result = nsEditor::JoinNodesImpl(mRightNode, mLeftNode, mParent, PR_FALSE);