diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:43:18 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:43:18 -0400 |
commit | 516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f (patch) | |
tree | aea649009c0ef563041ded0cb0c5d397568eab07 /editor/libeditor/PlaceholderTransaction.h | |
parent | 17f7e1c8c6fca351174bdbd73981aa8e44d0f9da (diff) | |
download | UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar.gz UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar.lz UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.tar.xz UXP-516fd67d506b8dd3c2721dfd1aa1bbef4a2eda6f.zip |
Bug 1337698 - Use UniquePtr instead of nsAutoPtr in editor
* PlaceholderTransaction should use UniquePtr
* HTMLEditor should use UniquePtr
* TypeInState should use UniquePtr
Tag #1375
Diffstat (limited to 'editor/libeditor/PlaceholderTransaction.h')
-rw-r--r-- | editor/libeditor/PlaceholderTransaction.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/libeditor/PlaceholderTransaction.h b/editor/libeditor/PlaceholderTransaction.h index 8193239be..7e592cc03 100644 --- a/editor/libeditor/PlaceholderTransaction.h +++ b/editor/libeditor/PlaceholderTransaction.h @@ -8,12 +8,12 @@ #include "EditAggregateTransaction.h" #include "mozilla/EditorUtils.h" +#include "mozilla/UniquePtr.h" #include "nsIAbsorbingTransaction.h" #include "nsIDOMNode.h" #include "nsCOMPtr.h" #include "nsWeakPtr.h" #include "nsWeakReference.h" -#include "nsAutoPtr.h" namespace mozilla { @@ -33,7 +33,8 @@ class PlaceholderTransaction final : public EditAggregateTransaction, public: NS_DECL_ISUPPORTS_INHERITED - PlaceholderTransaction(); + PlaceholderTransaction(EditorBase& aEditorBase, nsIAtom* aName, + UniquePtr<SelectionState> aSelState); NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PlaceholderTransaction, EditAggregateTransaction) @@ -46,9 +47,6 @@ public: // ------------ nsIAbsorbingTransaction ----------------------- - NS_IMETHOD Init(nsIAtom* aName, SelectionState* aSelState, - EditorBase* aEditorBase) override; - NS_IMETHOD GetTxnName(nsIAtom** aName) override; NS_IMETHOD StartSelectionEquals(SelectionState* aSelState, @@ -80,7 +78,7 @@ protected: // restore the selection properly. // Use a pointer because this is constructed before we exist. - nsAutoPtr<SelectionState> mStartSel; + UniquePtr<SelectionState> mStartSel; SelectionState mEndSel; // The editor for this transaction. |