Bug 830132 r=ehsan

This commit is contained in:
David Zbarsky 2013-01-14 21:06:19 -05:00
parent 79665a28e9
commit e577dac5c1
3 changed files with 5 additions and 5 deletions

View File

@ -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<nsIContent> refContent = parent->GetChildAt(mOffset);
mEditor->MarkNodeDirty(mNode);

View File

@ -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<nsINode> 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<nsINode> child = mRightNode->GetFirstChild();
child;
child = child->GetNextSibling())
{

View File

@ -201,7 +201,7 @@ NS_IMETHODIMP SplitElementTxn::RedoTransaction(void)
}
else
{
nsINode* child = mExistingRightNode->GetFirstChild();
nsCOMPtr<nsINode> child = mExistingRightNode->GetFirstChild();
for (int32_t i=0; i<mOffset; i++)
{
if (!child) {return NS_ERROR_NULL_POINTER;}