Bug 1620135 - Clean up trivial constructor and destructor under libeditor r=m_kato
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 06 Mar 2020 04:38:25 +0000
changeset 517222 2a14353432d8e6cfbc9406f63f2fa9f16bf02b49
parent 517221 1fc93d698058f4e4797a214d9b72ab7952fc7419
child 517223 26c12d5fffe943930d4a1f0529ce8e90192b1cad
push id37188
push userncsoregi@mozilla.com
push dateFri, 06 Mar 2020 20:10:41 +0000
treeherdermozilla-central@8ab81c8e93ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1620135
milestone75.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 1620135 - Clean up trivial constructor and destructor under libeditor r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D65448
editor/libeditor/CSSEditUtils.cpp
editor/libeditor/CSSEditUtils.h
editor/libeditor/ChangeAttributeTransaction.cpp
editor/libeditor/ChangeAttributeTransaction.h
editor/libeditor/ChangeStyleTransaction.cpp
editor/libeditor/ChangeStyleTransaction.h
editor/libeditor/CompositionTransaction.cpp
editor/libeditor/CompositionTransaction.h
editor/libeditor/CreateElementTransaction.cpp
editor/libeditor/CreateElementTransaction.h
editor/libeditor/DeleteNodeTransaction.cpp
editor/libeditor/DeleteNodeTransaction.h
editor/libeditor/EditAggregateTransaction.cpp
editor/libeditor/EditAggregateTransaction.h
editor/libeditor/EditTransactionBase.cpp
editor/libeditor/EditTransactionBase.h
editor/libeditor/HTMLAnonymousNodeEditor.cpp
editor/libeditor/HTMLEditorEventListener.h
editor/libeditor/InsertNodeTransaction.cpp
editor/libeditor/InsertNodeTransaction.h
editor/libeditor/InsertTextTransaction.cpp
editor/libeditor/InsertTextTransaction.h
editor/libeditor/PlaceholderTransaction.cpp
editor/libeditor/PlaceholderTransaction.h
editor/libeditor/SelectionState.cpp
editor/libeditor/SelectionState.h
editor/libeditor/SplitNodeTransaction.cpp
editor/libeditor/SplitNodeTransaction.h
--- a/editor/libeditor/CSSEditUtils.cpp
+++ b/editor/libeditor/CSSEditUtils.cpp
@@ -273,18 +273,16 @@ const CSSEditUtils::CSSEquivTable hrAlig
     {CSSEditUtils::eCSSEditableProperty_NONE, 0}};
 
 CSSEditUtils::CSSEditUtils(HTMLEditor* aHTMLEditor)
     : mHTMLEditor(aHTMLEditor), mIsCSSPrefChecked(true) {
   // let's retrieve the value of the "CSS editing" pref
   mIsCSSPrefChecked = Preferences::GetBool("editor.use_css", mIsCSSPrefChecked);
 }
 
-CSSEditUtils::~CSSEditUtils() {}
-
 // Answers true if we have some CSS equivalence for the HTML style defined
 // by aProperty and/or aAttribute for the node aNode
 
 // static
 bool CSSEditUtils::IsCSSEditableProperty(nsINode* aNode, nsAtom* aProperty,
                                          nsAtom* aAttribute) {
   MOZ_ASSERT(aNode);
 
--- a/editor/libeditor/CSSEditUtils.h
+++ b/editor/libeditor/CSSEditUtils.h
@@ -29,17 +29,16 @@ typedef void (*nsProcessValueFunc)(const
                                    nsAString& aOutputString,
                                    const char* aDefaultValueString,
                                    const char* aPrependString,
                                    const char* aAppendString);
 
 class CSSEditUtils final {
  public:
   explicit CSSEditUtils(HTMLEditor* aEditor);
-  ~CSSEditUtils();
 
   enum nsCSSEditableProperty {
     eCSSEditableProperty_NONE = 0,
     eCSSEditableProperty_background_color,
     eCSSEditableProperty_background_image,
     eCSSEditableProperty_border,
     eCSSEditableProperty_caption_side,
     eCSSEditableProperty_color,
--- a/editor/libeditor/ChangeAttributeTransaction.cpp
+++ b/editor/libeditor/ChangeAttributeTransaction.cpp
@@ -36,18 +36,16 @@ ChangeAttributeTransaction::ChangeAttrib
                                                        const nsAString* aValue)
     : EditTransactionBase(),
       mElement(&aElement),
       mAttribute(&aAttribute),
       mValue(aValue ? *aValue : EmptyString()),
       mRemoveAttribute(!aValue),
       mAttributeWasSet(false) {}
 
-ChangeAttributeTransaction::~ChangeAttributeTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(ChangeAttributeTransaction,
                                    EditTransactionBase, mElement)
 
 NS_IMPL_ADDREF_INHERITED(ChangeAttributeTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(ChangeAttributeTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ChangeAttributeTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
 
--- a/editor/libeditor/ChangeAttributeTransaction.h
+++ b/editor/libeditor/ChangeAttributeTransaction.h
@@ -56,17 +56,17 @@ class ChangeAttributeTransaction final :
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ChangeAttributeTransaction,
                                            EditTransactionBase)
 
   NS_DECL_EDITTRANSACTIONBASE
 
   NS_IMETHOD RedoTransaction() override;
 
  private:
-  virtual ~ChangeAttributeTransaction();
+  virtual ~ChangeAttributeTransaction() = default;
 
   // The element to operate upon
   nsCOMPtr<dom::Element> mElement;
 
   // The attribute to change
   RefPtr<nsAtom> mAttribute;
 
   // The value to set the attribute to (ignored if mRemoveAttribute==true)
--- a/editor/libeditor/ChangeStyleTransaction.cpp
+++ b/editor/libeditor/ChangeStyleTransaction.cpp
@@ -58,18 +58,16 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(Chang
                                    mElement)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ChangeStyleTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
 
 NS_IMPL_ADDREF_INHERITED(ChangeStyleTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(ChangeStyleTransaction, EditTransactionBase)
 
-ChangeStyleTransaction::~ChangeStyleTransaction() {}
-
 // Answers true if aValue is in the string list of white-space separated values
 // aValueList.
 bool ChangeStyleTransaction::ValueIncludes(const nsAString& aValueList,
                                            const nsAString& aValue) {
   nsAutoString valueList(aValueList);
   bool result = false;
 
   // put an extra null at the end
--- a/editor/libeditor/ChangeStyleTransaction.h
+++ b/editor/libeditor/ChangeStyleTransaction.h
@@ -64,17 +64,17 @@ class ChangeStyleTransaction final : pub
    * @param aValueList      [IN] a list of white-space separated values
    * @param aValue          [IN] the value to look for in the list
    * @return                true if the value is in the list of values
    */
   static bool ValueIncludes(const nsAString& aValueList,
                             const nsAString& aValue);
 
  private:
-  virtual ~ChangeStyleTransaction();
+  virtual ~ChangeStyleTransaction() = default;
 
   /*
    * Adds the value aNewValue to list of white-space separated values aValues.
    *
    * @param aValues         [IN/OUT] a list of wite-space separated values
    * @param aNewValue       [IN] a value this code adds to aValues if it is not
    *                        already in
    */
--- a/editor/libeditor/CompositionTransaction.cpp
+++ b/editor/libeditor/CompositionTransaction.cpp
@@ -63,18 +63,16 @@ CompositionTransaction::CompositionTrans
       mReplaceLength(aEditorBase.GetComposition()->XPLengthInTextNode()),
       mRanges(aEditorBase.GetComposition()->GetRanges()),
       mStringToInsert(aStringToInsert),
       mEditorBase(&aEditorBase),
       mFixed(false) {
   MOZ_ASSERT(mTextNode->TextLength() >= mOffset);
 }
 
-CompositionTransaction::~CompositionTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(CompositionTransaction, EditTransactionBase,
                                    mEditorBase, mTextNode)
 // mRangeList can't lead to cycles
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CompositionTransaction)
   NS_INTERFACE_MAP_ENTRY_CONCRETE(CompositionTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
 
--- a/editor/libeditor/CompositionTransaction.h
+++ b/editor/libeditor/CompositionTransaction.h
@@ -72,17 +72,17 @@ class CompositionTransaction final : pub
   void MarkFixed();
 
   static nsresult SetIMESelection(EditorBase& aEditorBase, dom::Text* aTextNode,
                                   uint32_t aOffsetInNode,
                                   uint32_t aLengthOfCompositionString,
                                   const TextRangeArray* aRanges);
 
  private:
-  ~CompositionTransaction();
+  virtual ~CompositionTransaction() = default;
 
   nsresult SetSelectionForRanges();
 
   // The text element to operate upon.
   RefPtr<dom::Text> mTextNode;
 
   // The offsets into mTextNode where the insertion should be placed.
   uint32_t mOffset;
--- a/editor/libeditor/CreateElementTransaction.cpp
+++ b/editor/libeditor/CreateElementTransaction.cpp
@@ -51,18 +51,16 @@ template <typename PT, typename CT>
 CreateElementTransaction::CreateElementTransaction(
     EditorBase& aEditorBase, nsAtom& aTag,
     const EditorDOMPointBase<PT, CT>& aPointToInsert)
     : EditTransactionBase(),
       mEditorBase(&aEditorBase),
       mTag(&aTag),
       mPointToInsert(aPointToInsert) {}
 
-CreateElementTransaction::~CreateElementTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(CreateElementTransaction,
                                    EditTransactionBase, mEditorBase,
                                    mPointToInsert, mNewNode)
 
 NS_IMPL_ADDREF_INHERITED(CreateElementTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(CreateElementTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CreateElementTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
--- a/editor/libeditor/CreateElementTransaction.h
+++ b/editor/libeditor/CreateElementTransaction.h
@@ -55,17 +55,17 @@ class CreateElementTransaction final : p
 
   NS_DECL_EDITTRANSACTIONBASE
 
   NS_IMETHOD RedoTransaction() override;
 
   already_AddRefed<dom::Element> GetNewNode();
 
  protected:
-  virtual ~CreateElementTransaction();
+  virtual ~CreateElementTransaction() = default;
 
   /**
    * InsertNewNode() inserts mNewNode before the child node at mPointToInsert.
    */
   void InsertNewNode(ErrorResult& aError);
 
   // The document into which the new node will be inserted.
   RefPtr<EditorBase> mEditorBase;
--- a/editor/libeditor/DeleteNodeTransaction.cpp
+++ b/editor/libeditor/DeleteNodeTransaction.cpp
@@ -24,18 +24,16 @@ already_AddRefed<DeleteNodeTransaction> 
 }
 
 DeleteNodeTransaction::DeleteNodeTransaction(EditorBase& aEditorBase,
                                              nsINode& aNodeToDelete)
     : mEditorBase(&aEditorBase),
       mNodeToDelete(&aNodeToDelete),
       mParentNode(aNodeToDelete.GetParentNode()) {}
 
-DeleteNodeTransaction::~DeleteNodeTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(DeleteNodeTransaction, EditTransactionBase,
                                    mEditorBase, mNodeToDelete, mParentNode,
                                    mRefNode)
 
 NS_IMPL_ADDREF_INHERITED(DeleteNodeTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(DeleteNodeTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DeleteNodeTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
--- a/editor/libeditor/DeleteNodeTransaction.h
+++ b/editor/libeditor/DeleteNodeTransaction.h
@@ -46,17 +46,17 @@ class DeleteNodeTransaction final : publ
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteNodeTransaction,
                                            EditTransactionBase)
 
   NS_DECL_EDITTRANSACTIONBASE
 
   NS_IMETHOD RedoTransaction() override;
 
  protected:
-  virtual ~DeleteNodeTransaction();
+  virtual ~DeleteNodeTransaction() = default;
 
   // The editor for this transaction.
   RefPtr<EditorBase> mEditorBase;
 
   // The element to delete.
   nsCOMPtr<nsINode> mNodeToDelete;
 
   // Parent of node to delete.
--- a/editor/libeditor/EditAggregateTransaction.cpp
+++ b/editor/libeditor/EditAggregateTransaction.cpp
@@ -8,20 +8,16 @@
 #include "nsCOMPtr.h"          // for nsCOMPtr
 #include "nsError.h"           // for NS_OK, etc.
 #include "nsISupportsUtils.h"  // for NS_ADDREF
 #include "nsITransaction.h"    // for nsITransaction
 #include "nsString.h"          // for nsAutoString
 
 namespace mozilla {
 
-EditAggregateTransaction::EditAggregateTransaction() {}
-
-EditAggregateTransaction::~EditAggregateTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(EditAggregateTransaction,
                                    EditTransactionBase, mChildren)
 
 NS_IMPL_ADDREF_INHERITED(EditAggregateTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(EditAggregateTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(EditAggregateTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
 
--- a/editor/libeditor/EditAggregateTransaction.h
+++ b/editor/libeditor/EditAggregateTransaction.h
@@ -19,17 +19,17 @@ class nsITransaction;
 namespace mozilla {
 
 /**
  * base class for all document editing transactions that require aggregation.
  * provides a list of child transactions.
  */
 class EditAggregateTransaction : public EditTransactionBase {
  protected:
-  EditAggregateTransaction();
+  EditAggregateTransaction() = default;
 
  public:
   /**
    * Creates an edit aggregate transaction.  This never returns nullptr.
    */
   static already_AddRefed<EditAggregateTransaction> Create() {
     RefPtr<EditAggregateTransaction> transaction =
         new EditAggregateTransaction();
@@ -51,17 +51,17 @@ class EditAggregateTransaction : public 
   NS_IMETHOD AppendChild(EditTransactionBase* aTransaction);
 
   /**
    * Get the name assigned to this transaction.
    */
   NS_IMETHOD GetName(nsAtom** aName);
 
  protected:
-  virtual ~EditAggregateTransaction();
+  virtual ~EditAggregateTransaction() = default;
 
   nsTArray<RefPtr<EditTransactionBase>> mChildren;
   RefPtr<nsAtom> mName;
 };
 
 }  // namespace mozilla
 
 #endif  // #ifndef EditAggregateTransaction_h
--- a/editor/libeditor/EditTransactionBase.cpp
+++ b/editor/libeditor/EditTransactionBase.cpp
@@ -19,18 +19,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(EditTransactionBase)
   NS_INTERFACE_MAP_ENTRY(nsITransaction)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsITransaction)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(EditTransactionBase)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(EditTransactionBase)
 
-EditTransactionBase::~EditTransactionBase() {}
-
 NS_IMETHODIMP
 EditTransactionBase::RedoTransaction() { return DoTransaction(); }
 
 NS_IMETHODIMP
 EditTransactionBase::GetIsTransient(bool* aIsTransient) {
   *aIsTransient = false;
 
   return NS_OK;
--- a/editor/libeditor/EditTransactionBase.h
+++ b/editor/libeditor/EditTransactionBase.h
@@ -21,17 +21,17 @@ class EditTransactionBase : public nsITr
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(EditTransactionBase, nsITransaction)
 
   NS_IMETHOD RedoTransaction(void) override;
   NS_IMETHOD GetIsTransient(bool* aIsTransient) override;
   NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aDidMerge) override;
 
  protected:
-  virtual ~EditTransactionBase();
+  virtual ~EditTransactionBase() = default;
 };
 
 }  // namespace mozilla
 
 #define NS_DECL_EDITTRANSACTIONBASE    \
   NS_IMETHOD DoTransaction() override; \
   NS_IMETHOD UndoTransaction() override;
 
--- a/editor/libeditor/HTMLAnonymousNodeEditor.cpp
+++ b/editor/libeditor/HTMLAnonymousNodeEditor.cpp
@@ -73,17 +73,17 @@ class ElementDeletionObserver final : pu
                           Element* aObservedElement)
       : mNativeAnonNode(aNativeAnonNode), mObservedElement(aObservedElement) {}
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMUTATIONOBSERVER_PARENTCHAINCHANGED
   NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
 
  protected:
-  ~ElementDeletionObserver() {}
+  ~ElementDeletionObserver() = default;
   nsIContent* mNativeAnonNode;
   Element* mObservedElement;
 };
 
 NS_IMPL_ISUPPORTS(ElementDeletionObserver, nsIMutationObserver)
 
 void ElementDeletionObserver::ParentChainChanged(nsIContent* aContent) {
   // If the native anonymous content has been unbound already in
--- a/editor/libeditor/HTMLEditorEventListener.h
+++ b/editor/libeditor/HTMLEditorEventListener.h
@@ -16,18 +16,16 @@ class EditorBase;
 class HTMLEditorEventListener final : public EditorEventListener {
  public:
   HTMLEditorEventListener()
       : EditorEventListener(),
         mListeningToMouseMoveEventForResizers(false),
         mListeningToMouseMoveEventForGrabber(false),
         mListeningToResizeEvent(false) {}
 
-  virtual ~HTMLEditorEventListener() {}
-
   // nsIDOMEventListener
   MOZ_CAN_RUN_SCRIPT
   NS_IMETHOD HandleEvent(dom::Event* aEvent) override;
 
   /**
    * Connect() fails if aEditorBase isn't an HTMLEditor instance.
    */
   virtual nsresult Connect(EditorBase* aEditorBase) override;
--- a/editor/libeditor/InsertNodeTransaction.cpp
+++ b/editor/libeditor/InsertNodeTransaction.cpp
@@ -46,18 +46,16 @@ InsertNodeTransaction::InsertNodeTransac
     : mContentToInsert(&aContentToInsert),
       mPointToInsert(aPointToInsert),
       mEditorBase(&aEditorBase) {
   MOZ_ASSERT(mPointToInsert.IsSetAndValid());
   // Ensure mPointToInsert stores child at offset.
   Unused << mPointToInsert.GetChild();
 }
 
-InsertNodeTransaction::~InsertNodeTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(InsertNodeTransaction, EditTransactionBase,
                                    mEditorBase, mContentToInsert,
                                    mPointToInsert)
 
 NS_IMPL_ADDREF_INHERITED(InsertNodeTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(InsertNodeTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(InsertNodeTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
--- a/editor/libeditor/InsertNodeTransaction.h
+++ b/editor/libeditor/InsertNodeTransaction.h
@@ -48,17 +48,17 @@ class InsertNodeTransaction final : publ
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(InsertNodeTransaction,
                                            EditTransactionBase)
 
   NS_DECL_EDITTRANSACTIONBASE
 
  protected:
-  virtual ~InsertNodeTransaction();
+  virtual ~InsertNodeTransaction() = default;
 
   // The element to insert.
   nsCOMPtr<nsIContent> mContentToInsert;
 
   // The DOM point we will insert mContentToInsert.
   EditorDOMPoint mPointToInsert;
 
   // The editor for this transaction.
--- a/editor/libeditor/InsertTextTransaction.cpp
+++ b/editor/libeditor/InsertTextTransaction.cpp
@@ -31,18 +31,16 @@ already_AddRefed<InsertTextTransaction> 
 InsertTextTransaction::InsertTextTransaction(
     EditorBase& aEditorBase, const nsAString& aStringToInsert,
     const EditorDOMPointInText& aPointToInsert)
     : mTextNode(aPointToInsert.ContainerAsText()),
       mOffset(aPointToInsert.Offset()),
       mStringToInsert(aStringToInsert),
       mEditorBase(&aEditorBase) {}
 
-InsertTextTransaction::~InsertTextTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(InsertTextTransaction, EditTransactionBase,
                                    mEditorBase, mTextNode)
 
 NS_IMPL_ADDREF_INHERITED(InsertTextTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(InsertTextTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(InsertTextTransaction)
   NS_INTERFACE_MAP_ENTRY_CONCRETE(InsertTextTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
--- a/editor/libeditor/InsertTextTransaction.h
+++ b/editor/libeditor/InsertTextTransaction.h
@@ -64,17 +64,17 @@ class InsertTextTransaction final : publ
   NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aDidMerge) override;
 
   /**
    * Return the string data associated with this transaction.
    */
   void GetData(nsString& aResult);
 
  private:
-  virtual ~InsertTextTransaction();
+  virtual ~InsertTextTransaction() = default;
 
   // Return true if aOtherTransaction immediately follows this transaction.
   bool IsSequentialInsert(InsertTextTransaction& aOtherTrasaction);
 
   // The Text node to operate upon.
   RefPtr<dom::Text> mTextNode;
 
   // The offset into mTextNode where the insertion is to take place.
--- a/editor/libeditor/PlaceholderTransaction.cpp
+++ b/editor/libeditor/PlaceholderTransaction.cpp
@@ -23,18 +23,16 @@ PlaceholderTransaction::PlaceholderTrans
       mForwarding(nullptr),
       mCompositionTransaction(nullptr),
       mStartSel(*std::move(aSelState)),
       mAbsorb(true),
       mCommitted(false) {
   mName = aName;
 }
 
-PlaceholderTransaction::~PlaceholderTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_CLASS(PlaceholderTransaction)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PlaceholderTransaction,
                                                 EditAggregateTransaction)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mEditorBase);
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mStartSel);
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mEndSel);
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
--- a/editor/libeditor/PlaceholderTransaction.h
+++ b/editor/libeditor/PlaceholderTransaction.h
@@ -74,17 +74,17 @@ class PlaceholderTransaction final : pub
 
   NS_IMETHOD_(PlaceholderTransaction*) AsPlaceholderTransaction() override {
     return this;
   }
 
   nsresult RememberEndingSelection();
 
  protected:
-  virtual ~PlaceholderTransaction();
+  virtual ~PlaceholderTransaction() = default;
 
   // The editor for this transaction.
   RefPtr<EditorBase> mEditorBase;
 
   nsWeakPtr mForwarding;
   // First IME txn in this placeholder - used for IME merging.
   mozilla::CompositionTransaction* mCompositionTransaction;
 
--- a/editor/libeditor/SelectionState.cpp
+++ b/editor/libeditor/SelectionState.cpp
@@ -576,18 +576,16 @@ void RangeUpdater::DidMoveNode(nsINode* 
 /******************************************************************************
  * mozilla::RangeItem
  *
  * Helper struct for SelectionState.  This stores range endpoints.
  ******************************************************************************/
 
 RangeItem::RangeItem() : mStartOffset{0}, mEndOffset{0} {}
 
-RangeItem::~RangeItem() {}
-
 NS_IMPL_CYCLE_COLLECTION(RangeItem, mStartContainer, mEndContainer)
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(RangeItem, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(RangeItem, Release)
 
 void RangeItem::StoreRange(nsRange* aRange) {
   MOZ_ASSERT(aRange);
   mStartContainer = aRange->GetStartContainer();
   mStartOffset = aRange->StartOffset();
--- a/editor/libeditor/SelectionState.h
+++ b/editor/libeditor/SelectionState.h
@@ -25,17 +25,17 @@ class Text;
 /**
  * A helper struct for saving/setting ranges.
  */
 struct RangeItem final {
   RangeItem();
 
  private:
   // Private destructor, to discourage deletion outside of Release():
-  ~RangeItem();
+  ~RangeItem() = default;
 
  public:
   void StoreRange(nsRange* aRange);
   void StoreRange(const EditorRawDOMPoint& aStartPoint,
                   const EditorRawDOMPoint& aEndPoint) {
     MOZ_ASSERT(aStartPoint.IsSet());
     MOZ_ASSERT(aEndPoint.IsSet());
     mStartContainer = aStartPoint.GetContainer();
--- a/editor/libeditor/SplitNodeTransaction.cpp
+++ b/editor/libeditor/SplitNodeTransaction.cpp
@@ -36,18 +36,16 @@ template <typename PT, typename CT>
 SplitNodeTransaction::SplitNodeTransaction(
     EditorBase& aEditorBase,
     const EditorDOMPointBase<PT, CT>& aStartOfRightNode)
     : mEditorBase(&aEditorBase), mStartOfRightNode(aStartOfRightNode) {
   MOZ_DIAGNOSTIC_ASSERT(aStartOfRightNode.IsSet());
   MOZ_DIAGNOSTIC_ASSERT(aStartOfRightNode.GetContainerAsContent());
 }
 
-SplitNodeTransaction::~SplitNodeTransaction() {}
-
 NS_IMPL_CYCLE_COLLECTION_INHERITED(SplitNodeTransaction, EditTransactionBase,
                                    mEditorBase, mStartOfRightNode, mParent,
                                    mNewLeftNode)
 
 NS_IMPL_ADDREF_INHERITED(SplitNodeTransaction, EditTransactionBase)
 NS_IMPL_RELEASE_INHERITED(SplitNodeTransaction, EditTransactionBase)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SplitNodeTransaction)
 NS_INTERFACE_MAP_END_INHERITING(EditTransactionBase)
--- a/editor/libeditor/SplitNodeTransaction.h
+++ b/editor/libeditor/SplitNodeTransaction.h
@@ -53,17 +53,17 @@ class SplitNodeTransaction final : publi
 
   NS_DECL_EDITTRANSACTIONBASE
 
   NS_IMETHOD RedoTransaction() override;
 
   nsIContent* GetNewNode();
 
  protected:
-  virtual ~SplitNodeTransaction();
+  virtual ~SplitNodeTransaction() = default;
 
   RefPtr<EditorBase> mEditorBase;
 
   // The container is existing right node (will be split).
   // The point referring this is start of the right node after it's split.
   EditorDOMPoint mStartOfRightNode;
 
   // The node we create when splitting mExistingRightNode.