зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
ccc649dbc7
Коммит
945e02484a
|
@ -66,7 +66,7 @@ DeleteNodeTransaction::DoTransaction()
|
||||||
// *before* we do the action, unlike some of the other RangeItem update
|
// *before* we do the action, unlike some of the other RangeItem update
|
||||||
// methods.
|
// methods.
|
||||||
if (mRangeUpdater) {
|
if (mRangeUpdater) {
|
||||||
mRangeUpdater->SelAdjDeleteNode(mNodeToDelete->AsDOMNode());
|
mRangeUpdater->SelAdjDeleteNode(mNodeToDelete);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorResult error;
|
ErrorResult error;
|
||||||
|
@ -96,7 +96,7 @@ DeleteNodeTransaction::RedoTransaction()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mRangeUpdater) {
|
if (mRangeUpdater) {
|
||||||
mRangeUpdater->SelAdjDeleteNode(mNodeToDelete->AsDOMNode());
|
mRangeUpdater->SelAdjDeleteNode(mNodeToDelete);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorResult error;
|
ErrorResult error;
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ EditorBase::InsertNode(nsIContent& aNode,
|
||||||
CreateTxnForInsertNode(aNode, aParent, aPosition);
|
CreateTxnForInsertNode(aNode, aParent, aPosition);
|
||||||
nsresult rv = DoTransaction(transaction);
|
nsresult rv = DoTransaction(transaction);
|
||||||
|
|
||||||
mRangeUpdater.SelAdjInsertNode(aParent.AsDOMNode(), aPosition);
|
mRangeUpdater.SelAdjInsertNode(&aParent, aPosition);
|
||||||
|
|
||||||
{
|
{
|
||||||
AutoActionListenerArray listeners(mActionListeners);
|
AutoActionListenerArray listeners(mActionListeners);
|
||||||
|
|
|
@ -242,14 +242,6 @@ RangeUpdater::SelAdjCreateNode(nsINode* aParent,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
|
||||||
RangeUpdater::SelAdjCreateNode(nsIDOMNode* aParent,
|
|
||||||
int32_t aPosition)
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsINode> parent = do_QueryInterface(aParent);
|
|
||||||
return SelAdjCreateNode(parent, aPosition);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
RangeUpdater::SelAdjInsertNode(nsINode* aParent,
|
RangeUpdater::SelAdjInsertNode(nsINode* aParent,
|
||||||
int32_t aPosition)
|
int32_t aPosition)
|
||||||
|
@ -257,13 +249,6 @@ RangeUpdater::SelAdjInsertNode(nsINode* aParent,
|
||||||
return SelAdjCreateNode(aParent, aPosition);
|
return SelAdjCreateNode(aParent, aPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
|
||||||
RangeUpdater::SelAdjInsertNode(nsIDOMNode* aParent,
|
|
||||||
int32_t aPosition)
|
|
||||||
{
|
|
||||||
return SelAdjCreateNode(aParent, aPosition);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RangeUpdater::SelAdjDeleteNode(nsINode* aNode)
|
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
|
nsresult
|
||||||
RangeUpdater::SelAdjSplitNode(nsIContent& aOldRightNode,
|
RangeUpdater::SelAdjSplitNode(nsIContent& aOldRightNode,
|
||||||
int32_t aOffset,
|
int32_t aOffset,
|
||||||
|
|
|
@ -109,11 +109,8 @@ public:
|
||||||
// DOM Range gravity will promote the selection out of the node on deletion,
|
// 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.
|
// which is not what you want if you know you are reinserting it.
|
||||||
nsresult SelAdjCreateNode(nsINode* aParent, int32_t aPosition);
|
nsresult SelAdjCreateNode(nsINode* aParent, int32_t aPosition);
|
||||||
nsresult SelAdjCreateNode(nsIDOMNode* aParent, int32_t aPosition);
|
|
||||||
nsresult SelAdjInsertNode(nsINode* aParent, int32_t aPosition);
|
nsresult SelAdjInsertNode(nsINode* aParent, int32_t aPosition);
|
||||||
nsresult SelAdjInsertNode(nsIDOMNode* aParent, int32_t aPosition);
|
|
||||||
void SelAdjDeleteNode(nsINode* aNode);
|
void SelAdjDeleteNode(nsINode* aNode);
|
||||||
void SelAdjDeleteNode(nsIDOMNode* aNode);
|
|
||||||
nsresult SelAdjSplitNode(nsIContent& aOldRightNode, int32_t aOffset,
|
nsresult SelAdjSplitNode(nsIContent& aOldRightNode, int32_t aOffset,
|
||||||
nsIContent* aNewLeftNode);
|
nsIContent* aNewLeftNode);
|
||||||
nsresult SelAdjJoinNodes(nsINode& aLeftNode,
|
nsresult SelAdjJoinNodes(nsINode& aLeftNode,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче