From b5223c28f5409408066296fb0da7772f42a27f44 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Fri, 24 Jun 2016 15:21:35 +0900 Subject: [PATCH] Bug 1260651 part.43 Rename nsAutoInsertContainerSelNotify to mozilla::AutoInsertContainerSelNotify r=mccr8 MozReview-Commit-ID: GEfM8GJO3xd --- editor/libeditor/SelectionState.h | 34 +++++++++++++++---------------- editor/libeditor/nsEditor.cpp | 2 +- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/editor/libeditor/SelectionState.h b/editor/libeditor/SelectionState.h index 8388c7005771..b2072114c61b 100644 --- a/editor/libeditor/SelectionState.h +++ b/editor/libeditor/SelectionState.h @@ -292,32 +292,30 @@ public: } }; -} // namespace mozilla - -/*************************************************************************** - * another helper class for SelectionState. stack based class for doing +/** + * Another helper class for SelectionState. Stack based class for doing * Will/DidInsertContainer() */ -class MOZ_STACK_CLASS nsAutoInsertContainerSelNotify +class MOZ_STACK_CLASS AutoInsertContainerSelNotify final { - private: - mozilla::RangeUpdater& mRU; +private: + RangeUpdater& mRangeUpdater; - public: - explicit nsAutoInsertContainerSelNotify( - mozilla::RangeUpdater& aRangeUpdater) : - mRU(aRangeUpdater) - { - mRU.WillInsertContainer(); - } +public: + explicit AutoInsertContainerSelNotify(RangeUpdater& aRangeUpdater) + : mRangeUpdater(aRangeUpdater) + { + mRangeUpdater.WillInsertContainer(); + } - ~nsAutoInsertContainerSelNotify() - { - mRU.DidInsertContainer(); - } + ~AutoInsertContainerSelNotify() + { + mRangeUpdater.DidInsertContainer(); + } }; +} // namespace mozilla /*************************************************************************** * another helper class for SelectionState. stack based class for doing diff --git a/editor/libeditor/nsEditor.cpp b/editor/libeditor/nsEditor.cpp index 0ffc3fec7953..76fd1025572c 100644 --- a/editor/libeditor/nsEditor.cpp +++ b/editor/libeditor/nsEditor.cpp @@ -1663,7 +1663,7 @@ nsEditor::InsertContainerAbove(nsIContent* aNode, } // Notify our internal selection state listener - nsAutoInsertContainerSelNotify selNotify(mRangeUpdater); + AutoInsertContainerSelNotify selNotify(mRangeUpdater); // Put inNode in new parent, outNode res = DeleteNode(aNode);