summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/PlaceholderTransaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/PlaceholderTransaction.h')
-rw-r--r--editor/libeditor/PlaceholderTransaction.h15
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: