Bug 1372859 - Remove SelAdj* method of nsIDOM* version from RangeUpdater. r=masayuki

Since RangeUpdater::SelAdj* method of nsIDOM* version requires additional QI and we don't use nsIDOM* as parameter, it is unnecessary to keep it.

MozReview-Commit-ID: 4XyYBG6Qrhl

--HG--
extra : rebase_source : 5fd830a2ffeff944471f026ded704a46ac4dd3d5
This commit is contained in:
Makoto Kato 2017-06-14 19:34:38 +09:00
Родитель ccc649dbc7
Коммит 945e02484a
4 изменённых файлов: 3 добавлений и 29 удалений

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

@ -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;

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

@ -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);

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

@ -242,14 +242,6 @@ RangeUpdater::SelAdjCreateNode(nsINode* aParent,
return NS_OK;
}
nsresult
RangeUpdater::SelAdjCreateNode(nsIDOMNode* aParent,
int32_t aPosition)
{
nsCOMPtr<nsINode> 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<nsINode> node = do_QueryInterface(aNode);
NS_ENSURE_TRUE_VOID(node);
return SelAdjDeleteNode(node);
}
nsresult
RangeUpdater::SelAdjSplitNode(nsIContent& aOldRightNode,
int32_t aOffset,

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

@ -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,