Bug 1372829 - Part 1: Make mozilla::PlaceholderTransaction inherit mozilla::SupportsWeakPtr instead of nsSupportsWeakReference

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 05:45:53 -04:00 committed by Roy Tam
commit db34da8e01
6 changed files with 53 additions and 43 deletions

View file

@ -10,8 +10,9 @@
#include "mozFlushType.h" // for mozFlushType enum
#include "mozilla/OwningNonNull.h" // for OwningNonNull
#include "mozilla/SelectionState.h" // for RangeUpdater, etc.
#include "mozilla/StyleSheet.h" // for StyleSheet
#include "mozilla/StyleSheet.h" // for StyleSheet
#include "mozilla/UniquePtr.h"
#include "mozilla/WeakPtr.h" // for WeakPtr
#include "mozilla/dom/Text.h"
#include "nsCOMPtr.h" // for already_AddRefed, nsCOMPtr
#include "nsCycleCollectionParticipant.h"
@ -116,6 +117,7 @@ class ErrorResult;
class InsertNodeTransaction;
class InsertTextTransaction;
class JoinNodeTransaction;
class PlaceholderTransaction;
class RemoveStyleSheetTransaction;
class SplitNodeTransaction;
class TextComposition;
@ -976,11 +978,11 @@ protected:
// Weak reference to the nsISelectionController.
nsWeakPtr mSelConWeak;
// Weak reference to placeholder for begin/end batch purposes.
nsWeakPtr mPlaceHolderTxn;
WeakPtr<PlaceholderTransaction> mPlaceholderTransactionWeak;
// Weak reference to the nsIDOMDocument.
nsWeakPtr mDocWeak;
// Name of placeholder transaction.
nsIAtom* mPlaceHolderName;
nsIAtom* mPlaceholderName;
// Saved selection state for placeholder transaction batching.
mozilla::UniquePtr<SelectionState> mSelState;
nsString* mPhonetic;
@ -1014,7 +1016,7 @@ protected:
int32_t mUpdateCount;
// Nesting count for batching.
int32_t mPlaceHolderBatch;
int32_t mPlaceholderBatch;
// The current editor action.
EditAction mAction;