diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:45:53 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:45:53 -0400 |
commit | ea3a2ce279f92457bfd6168f97b106be193ea740 (patch) | |
tree | e16a1be460feee615ade9b680fd00a171c8b90cd /editor/libeditor/PlaceholderTransaction.h | |
parent | 5a379a4b15b4da55f5fda0be56c43a85e0162f05 (diff) | |
download | UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar.gz UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar.lz UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.tar.xz UXP-ea3a2ce279f92457bfd6168f97b106be193ea740.zip |
Bug 1372829 - Part 1: Make mozilla::PlaceholderTransaction inherit mozilla::SupportsWeakPtr instead of nsSupportsWeakReference
Tag #1375
Diffstat (limited to 'editor/libeditor/PlaceholderTransaction.h')
-rw-r--r-- | editor/libeditor/PlaceholderTransaction.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/editor/libeditor/PlaceholderTransaction.h b/editor/libeditor/PlaceholderTransaction.h index 7e592cc03..5fa58a1e9 100644 --- a/editor/libeditor/PlaceholderTransaction.h +++ b/editor/libeditor/PlaceholderTransaction.h @@ -9,6 +9,7 @@ #include "EditAggregateTransaction.h" #include "mozilla/EditorUtils.h" #include "mozilla/UniquePtr.h" +#include "mozilla/WeakPtr.h" #include "nsIAbsorbingTransaction.h" #include "nsIDOMNode.h" #include "nsCOMPtr.h" @@ -26,11 +27,14 @@ class CompositionTransaction; * transactions it has absorbed. */ -class PlaceholderTransaction final : public EditAggregateTransaction, - public nsIAbsorbingTransaction, - public nsSupportsWeakReference +class PlaceholderTransaction final + : public EditAggregateTransaction + , public nsIAbsorbingTransaction + , public SupportsWeakPtr<PlaceholderTransaction> { public: + MOZ_DECLARE_WEAKREFERENCE_TYPENAME(PlaceholderTransaction) + NS_DECL_ISUPPORTS_INHERITED PlaceholderTransaction(EditorBase& aEditorBase, nsIAtom* aName, @@ -59,6 +63,11 @@ public: NS_IMETHOD Commit() override; + NS_IMETHOD_(PlaceholderTransaction*) AsPlaceholderTransaction() override + { + return this; + } + nsresult RememberEndingSelection(); protected: |