Bumping manifests a=b2g-bump
[gecko.git] / editor / libeditor / DeleteNodeTxn.h
blobb2ebe167f385d3118382d75ad9e86905d1afc93a
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 DeleteNodeTxn_h__
7 #define DeleteNodeTxn_h__
9 #include "EditTxn.h"
10 #include "nsCOMPtr.h"
11 #include "nsCycleCollectionParticipant.h"
12 #include "nsIContent.h"
13 #include "nsINode.h"
14 #include "nsISupportsImpl.h"
15 #include "nscore.h"
17 class nsEditor;
18 class nsRangeUpdater;
20 /**
21 * A transaction that deletes a single element
23 class DeleteNodeTxn : public EditTxn
25 public:
26 /** initialize the transaction.
27 * @param aElement the node to delete
29 nsresult Init(nsEditor* aEditor, nsINode* aNode,
30 nsRangeUpdater* aRangeUpdater);
32 DeleteNodeTxn();
34 NS_DECL_ISUPPORTS_INHERITED
35 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteNodeTxn, EditTxn)
37 NS_DECL_EDITTXN
39 NS_IMETHOD RedoTransaction();
41 protected:
42 virtual ~DeleteNodeTxn();
44 /** the element to delete */
45 nsCOMPtr<nsINode> mNode;
47 /** parent of node to delete */
48 nsCOMPtr<nsINode> mParent;
50 /** next sibling to remember for undo/redo purposes */
51 nsCOMPtr<nsIContent> mRefNode;
53 /** the editor for this transaction */
54 nsEditor* mEditor;
56 /** range updater object */
57 nsRangeUpdater* mRangeUpdater;
60 #endif