diff --git a/editor/libeditor/DeleteNodeTransaction.cpp b/editor/libeditor/DeleteNodeTransaction.cpp index 3692745017d5..9c9442f9353c 100644 --- a/editor/libeditor/DeleteNodeTransaction.cpp +++ b/editor/libeditor/DeleteNodeTransaction.cpp @@ -66,7 +66,7 @@ DeleteNodeTransaction::DoTransaction() // *before* we do the action, unlike some of the other RangeItem update // methods. if (mRangeUpdater) { - mRangeUpdater->SelAdjDeleteNode(mNodeToDelete->AsDOMNode()); + mRangeUpdater->SelAdjDeleteNode(mNodeToDelete); } ErrorResult error; @@ -96,7 +96,7 @@ DeleteNodeTransaction::RedoTransaction() } if (mRangeUpdater) { - mRangeUpdater->SelAdjDeleteNode(mNodeToDelete->AsDOMNode()); + mRangeUpdater->SelAdjDeleteNode(mNodeToDelete); } ErrorResult error; diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index fe39df84041a..642a66d761f2 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -1453,7 +1453,7 @@ EditorBase::InsertNode(nsIContent& aNode, CreateTxnForInsertNode(aNode, aParent, aPosition); nsresult rv = DoTransaction(transaction); - mRangeUpdater.SelAdjInsertNode(aParent.AsDOMNode(), aPosition); + mRangeUpdater.SelAdjInsertNode(&aParent, aPosition); { AutoActionListenerArray listeners(mActionListeners); diff --git a/editor/libeditor/SelectionState.cpp b/editor/libeditor/SelectionState.cpp index de6123a925fb..6607a6b654ff 100644 --- a/editor/libeditor/SelectionState.cpp +++ b/editor/libeditor/SelectionState.cpp @@ -242,14 +242,6 @@ RangeUpdater::SelAdjCreateNode(nsINode* aParent, return NS_OK; } -nsresult -RangeUpdater::SelAdjCreateNode(nsIDOMNode* aParent, - int32_t aPosition) -{ - nsCOMPtr parent = do_QueryInterface(aParent); - return SelAdjCreateNode(parent, aPosition); -} - nsresult RangeUpdater::SelAdjInsertNode(nsINode* aParent, int32_t aPosition) @@ -257,13 +249,6 @@ RangeUpdater::SelAdjInsertNode(nsINode* aParent, return SelAdjCreateNode(aParent, aPosition); } -nsresult -RangeUpdater::SelAdjInsertNode(nsIDOMNode* aParent, - int32_t aPosition) -{ - return SelAdjCreateNode(aParent, aPosition); -} - void RangeUpdater::SelAdjDeleteNode(nsINode* aNode) { @@ -319,14 +304,6 @@ RangeUpdater::SelAdjDeleteNode(nsINode* aNode) } } -void -RangeUpdater::SelAdjDeleteNode(nsIDOMNode* aNode) -{ - nsCOMPtr node = do_QueryInterface(aNode); - NS_ENSURE_TRUE_VOID(node); - return SelAdjDeleteNode(node); -} - nsresult RangeUpdater::SelAdjSplitNode(nsIContent& aOldRightNode, int32_t aOffset, diff --git a/editor/libeditor/SelectionState.h b/editor/libeditor/SelectionState.h index 3677dc89d8ad..493705f825ef 100644 --- a/editor/libeditor/SelectionState.h +++ b/editor/libeditor/SelectionState.h @@ -109,11 +109,8 @@ public: // DOM Range gravity will promote the selection out of the node on deletion, // which is not what you want if you know you are reinserting it. nsresult SelAdjCreateNode(nsINode* aParent, int32_t aPosition); - nsresult SelAdjCreateNode(nsIDOMNode* aParent, int32_t aPosition); nsresult SelAdjInsertNode(nsINode* aParent, int32_t aPosition); - nsresult SelAdjInsertNode(nsIDOMNode* aParent, int32_t aPosition); void SelAdjDeleteNode(nsINode* aNode); - void SelAdjDeleteNode(nsIDOMNode* aNode); nsresult SelAdjSplitNode(nsIContent& aOldRightNode, int32_t aOffset, nsIContent* aNewLeftNode); nsresult SelAdjJoinNodes(nsINode& aLeftNode,