Bug 1874684 - Part 17: Fix uninitialised variable warnings from clang-tidy. r=allstarschh
[gecko.git] / editor / libeditor / DeleteMultipleRangesTransaction.h
blob3af24ba2979327a8369414e4c4f8aecc5be1ba6b
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef DeleteMultipleRangesTransactionBase_h
7 #define DeleteMultipleRangesTransactionBase_h
9 #include "DeleteContentTransactionBase.h"
10 #include "EditAggregateTransaction.h"
12 #include "EditorForwards.h"
14 #include "nsCycleCollectionParticipant.h"
15 #include "nsISupportsImpl.h"
17 namespace mozilla {
19 /**
20 * An abstract transaction that removes text or node.
22 class DeleteMultipleRangesTransaction final : public EditAggregateTransaction {
23 public:
24 static already_AddRefed<DeleteMultipleRangesTransaction> Create() {
25 RefPtr<DeleteMultipleRangesTransaction> transaction =
26 new DeleteMultipleRangesTransaction();
27 return transaction.forget();
30 NS_DECL_ISUPPORTS_INHERITED
31 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteMultipleRangesTransaction,
32 EditAggregateTransaction)
34 NS_DECL_EDITTRANSACTIONBASE
35 NS_DECL_EDITTRANSACTIONBASE_GETASMETHODS_OVERRIDE(
36 DeleteMultipleRangesTransaction)
38 MOZ_CAN_RUN_SCRIPT NS_IMETHOD RedoTransaction() final;
40 void AppendChild(DeleteContentTransactionBase& aTransaction);
41 void AppendChild(DeleteRangeTransaction& aTransaction);
43 /**
44 * Return latest caret point suggestion of child transaction.
46 EditorDOMPoint SuggestPointToPutCaret() const;
48 protected:
49 ~DeleteMultipleRangesTransaction() = default;
52 } // namespace mozilla
54 #endif // #ifndef DeleteMultipleRangesTransaction_h