Bug 1260651 part.41 Rename mozilla::dom::AutoReplaceContainerSelNotify to mozilla::AutoReplaceContainerSelNotify r=mccr8
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 24 Jun 2016 15:14:16 +0900
changeset 304336 00c5a750b6a61a51475563f6c80f086c0211a93a
parent 304335 116492eeee2b32705ddb4f350ffd815d0886d936
child 304337 ccc960e89450a406ed569a972866068fd1aee58d
push id79299
push usermasayuki@d-toybox.com
push dateSat, 09 Jul 2016 08:01:22 +0000
treeherdermozilla-inbound@942dac383054 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1260651
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1260651 part.41 Rename mozilla::dom::AutoReplaceContainerSelNotify to mozilla::AutoReplaceContainerSelNotify r=mccr8 MozReview-Commit-ID: 2EB2yQOpjO9
editor/libeditor/SelectionState.h
--- a/editor/libeditor/SelectionState.h
+++ b/editor/libeditor/SelectionState.h
@@ -223,47 +223,45 @@ public:
       *mNode = mRangeItem->startNode;
     } else {
       *mDOMNode = GetAsDOMNode(mRangeItem->startNode);
     }
     *mOffset = mRangeItem->startOffset;
   }
 };
 
-/******************************************************************************
- * another helper class for SelectionState.  stack based class for doing
+/**
+ * Another helper class for SelectionState.  Stack based class for doing
  * Will/DidReplaceContainer()
  */
 
-namespace dom {
-class MOZ_STACK_CLASS AutoReplaceContainerSelNotify
+class MOZ_STACK_CLASS AutoReplaceContainerSelNotify final
 {
-  private:
-    RangeUpdater& mRU;
-    Element* mOriginalElement;
-    Element* mNewElement;
+private:
+  RangeUpdater& mRangeUpdater;
+  dom::Element* mOriginalElement;
+  dom::Element* mNewElement;
 
-  public:
-    AutoReplaceContainerSelNotify(RangeUpdater& aRangeUpdater,
-                                  Element* aOriginalElement,
-                                  Element* aNewElement)
-      : mRU(aRangeUpdater)
-      , mOriginalElement(aOriginalElement)
-      , mNewElement(aNewElement)
-    {
-      mRU.WillReplaceContainer();
-    }
+public:
+  AutoReplaceContainerSelNotify(RangeUpdater& aRangeUpdater,
+                                dom::Element* aOriginalElement,
+                                dom::Element* aNewElement)
+    : mRangeUpdater(aRangeUpdater)
+    , mOriginalElement(aOriginalElement)
+    , mNewElement(aNewElement)
+  {
+    mRangeUpdater.WillReplaceContainer();
+  }
 
-    ~AutoReplaceContainerSelNotify()
-    {
-      mRU.DidReplaceContainer(mOriginalElement, mNewElement);
-    }
+  ~AutoReplaceContainerSelNotify()
+  {
+    mRangeUpdater.DidReplaceContainer(mOriginalElement, mNewElement);
+  }
 };
 
-} // namespace dom
 } // namespace mozilla
 
 
 /***************************************************************************
  * another helper class for SelectionState.  stack based class for doing
  * Will/DidRemoveContainer()
  */