Bug 1260651 part.42 Rename nsAutoRemoveContainerSelNotify to mozilla::AutoRemoveContainerSelNotify r=mccr8

MozReview-Commit-ID: GyU26vXBGyt
This commit is contained in:
Masayuki Nakano 2016-07-07 18:27:18 +09:00
Родитель ae63c1d600
Коммит 35be83ddea
2 изменённых файлов: 31 добавлений и 32 удалений

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

@ -257,44 +257,43 @@ public:
}
};
} // namespace mozilla
/***************************************************************************
* another helper class for SelectionState. stack based class for doing
/**
* Another helper class for SelectionState. Stack based class for doing
* Will/DidRemoveContainer()
*/
class MOZ_STACK_CLASS nsAutoRemoveContainerSelNotify
class MOZ_STACK_CLASS AutoRemoveContainerSelNotify final
{
private:
mozilla::RangeUpdater& mRU;
nsIDOMNode *mNode;
nsIDOMNode *mParent;
int32_t mOffset;
uint32_t mNodeOrigLen;
private:
RangeUpdater& mRangeUpdater;
nsIDOMNode* mNode;
nsIDOMNode* mParent;
int32_t mOffset;
uint32_t mNodeOrigLen;
public:
nsAutoRemoveContainerSelNotify(mozilla::RangeUpdater& aRangeUpdater,
nsINode* aNode,
nsINode* aParent,
int32_t aOffset,
uint32_t aNodeOrigLen)
: mRU(aRangeUpdater)
, mNode(aNode->AsDOMNode())
, mParent(aParent->AsDOMNode())
, mOffset(aOffset)
, mNodeOrigLen(aNodeOrigLen)
{
mRU.WillRemoveContainer();
}
public:
AutoRemoveContainerSelNotify(RangeUpdater& aRangeUpdater,
nsINode* aNode,
nsINode* aParent,
int32_t aOffset,
uint32_t aNodeOrigLen)
: mRangeUpdater(aRangeUpdater)
, mNode(aNode->AsDOMNode())
, mParent(aParent->AsDOMNode())
, mOffset(aOffset)
, mNodeOrigLen(aNodeOrigLen)
{
mRangeUpdater.WillRemoveContainer();
}
~nsAutoRemoveContainerSelNotify()
{
mRU.DidRemoveContainer(mNode, mParent, mOffset, mNodeOrigLen);
}
~AutoRemoveContainerSelNotify()
{
mRangeUpdater.DidRemoveContainer(mNode, mParent, mOffset, mNodeOrigLen);
}
};
} // namespace mozilla
/***************************************************************************
* another helper class for SelectionState. stack based class for doing
* Will/DidInsertContainer()

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

@ -1617,8 +1617,8 @@ nsEditor::RemoveContainer(nsIContent* aNode)
uint32_t nodeOrigLen = aNode->GetChildCount();
// notify our internal selection state listener
nsAutoRemoveContainerSelNotify selNotify(mRangeUpdater, aNode, parent,
offset, nodeOrigLen);
AutoRemoveContainerSelNotify selNotify(mRangeUpdater, aNode, parent,
offset, nodeOrigLen);
while (aNode->HasChildren()) {
nsCOMPtr<nsIContent> child = aNode->GetLastChild();