From e577dac5c107d6881fa39659b2eb4d840aadbbc7 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Mon, 14 Jan 2013 21:06:19 -0500 Subject: [PATCH] Bug 830132 r=ehsan --- editor/libeditor/base/InsertElementTxn.cpp | 2 +- editor/libeditor/base/JoinElementTxn.cpp | 6 +++--- editor/libeditor/base/SplitElementTxn.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/editor/libeditor/base/InsertElementTxn.cpp b/editor/libeditor/base/InsertElementTxn.cpp index 7923904eed6..22bf6fb4914 100644 --- a/editor/libeditor/base/InsertElementTxn.cpp +++ b/editor/libeditor/base/InsertElementTxn.cpp @@ -95,7 +95,7 @@ NS_IMETHODIMP InsertElementTxn::DoTransaction(void) } // note, it's ok for refContent to be null. that means append - nsIContent* refContent = parent->GetChildAt(mOffset); + nsCOMPtr refContent = parent->GetChildAt(mOffset); mEditor->MarkNodeDirty(mNode); diff --git a/editor/libeditor/base/JoinElementTxn.cpp b/editor/libeditor/base/JoinElementTxn.cpp index 81b9fba1e2d..7d7b5f158bc 100644 --- a/editor/libeditor/base/JoinElementTxn.cpp +++ b/editor/libeditor/base/JoinElementTxn.cpp @@ -51,12 +51,12 @@ NS_IMETHODIMP JoinElementTxn::Init(nsEditor *aEditor, if (!aEditor || !aLeftNode || !aRightNode) { return NS_ERROR_NULL_POINTER; } mEditor = aEditor; mLeftNode = aLeftNode; - nsINode* leftParent = mLeftNode->GetParentNode(); + nsCOMPtr leftParent = mLeftNode->GetParentNode(); if (!mEditor->IsModifiableNode(leftParent)) { return NS_ERROR_FAILURE; } mRightNode = aRightNode; - mOffset=0; + mOffset = 0; return NS_OK; } @@ -138,7 +138,7 @@ NS_IMETHODIMP JoinElementTxn::UndoTransaction(void) } else { - for (nsINode* child = mRightNode->GetFirstChild(); + for (nsCOMPtr child = mRightNode->GetFirstChild(); child; child = child->GetNextSibling()) { diff --git a/editor/libeditor/base/SplitElementTxn.cpp b/editor/libeditor/base/SplitElementTxn.cpp index 9217461b770..3a8d0460381 100644 --- a/editor/libeditor/base/SplitElementTxn.cpp +++ b/editor/libeditor/base/SplitElementTxn.cpp @@ -201,7 +201,7 @@ NS_IMETHODIMP SplitElementTxn::RedoTransaction(void) } else { - nsINode* child = mExistingRightNode->GetFirstChild(); + nsCOMPtr child = mExistingRightNode->GetFirstChild(); for (int32_t i=0; i