mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 748223 - Pack nsEditor better; r=roc
This commit is contained in:
parent
bf23820909
commit
a134bc2b8b
@ -147,34 +147,28 @@ extern nsIParserService *sParserService;
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
nsEditor::nsEditor()
|
||||
: mModCount(0)
|
||||
: mPlaceHolderName(nsnull)
|
||||
, mSelState(nsnull)
|
||||
, mPhonetic(nsnull)
|
||||
, mModCount(0)
|
||||
, mFlags(0)
|
||||
, mUpdateCount(0)
|
||||
, mSpellcheckCheckboxState(eTriUnset)
|
||||
, mPlaceHolderTxn(nsnull)
|
||||
, mPlaceHolderName(nsnull)
|
||||
, mPlaceHolderBatch(0)
|
||||
, mSelState(nsnull)
|
||||
, mSavedSel()
|
||||
, mRangeUpdater()
|
||||
, mAction(nsnull)
|
||||
, mDirection(eNone)
|
||||
, mIMETextNode(nsnull)
|
||||
, mHandlingActionCount(0)
|
||||
, mIMETextOffset(0)
|
||||
, mIMEBufferLength(0)
|
||||
, mDirection(eNone)
|
||||
, mDocDirtyState(-1)
|
||||
, mSpellcheckCheckboxState(eTriUnset)
|
||||
, mInIMEMode(false)
|
||||
, mIsIMEComposing(false)
|
||||
, mShouldTxnSetSelection(true)
|
||||
, mDidPreDestroy(false)
|
||||
, mDidPostCreate(false)
|
||||
, mDocDirtyState(-1)
|
||||
, mDocWeak(nsnull)
|
||||
, mPhonetic(nsnull)
|
||||
, mHandlingActionCount(0)
|
||||
, mHandlingTrustedAction(false)
|
||||
, mDispatchInputEvent(true)
|
||||
{
|
||||
//initialize member variables here
|
||||
}
|
||||
|
||||
nsEditor::~nsEditor()
|
||||
|
@ -218,8 +218,6 @@ public:
|
||||
void SwitchTextDirectionTo(PRUint32 aDirection);
|
||||
|
||||
protected:
|
||||
nsCString mContentMIMEType; // MIME type of the doc we are editing.
|
||||
|
||||
nsresult DetermineCurrentDirection();
|
||||
|
||||
/** create a transaction for setting aAttribute to aValue on aElement
|
||||
@ -793,59 +791,60 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
PRUint32 mModCount; // number of modifications (for undo/redo stack)
|
||||
PRUint32 mFlags; // behavior flags. See nsIPlaintextEditor.idl for the flags we use.
|
||||
|
||||
nsWeakPtr mSelConWeak; // weak reference to the nsISelectionController
|
||||
PRInt32 mUpdateCount;
|
||||
|
||||
// Spellchecking
|
||||
enum Tristate {
|
||||
eTriUnset,
|
||||
eTriFalse,
|
||||
eTriTrue
|
||||
} mSpellcheckCheckboxState;
|
||||
};
|
||||
// Spellchecking
|
||||
nsCString mContentMIMEType; // MIME type of the doc we are editing.
|
||||
|
||||
nsCOMPtr<nsIInlineSpellChecker> mInlineSpellChecker;
|
||||
|
||||
nsCOMPtr<nsITransactionManager> mTxnMgr;
|
||||
nsWeakPtr mPlaceHolderTxn; // weak reference to placeholder for begin/end batch purposes
|
||||
nsIAtom *mPlaceHolderName; // name of placeholder transaction
|
||||
PRInt32 mPlaceHolderBatch; // nesting count for batching
|
||||
nsSelectionState *mSelState; // saved selection state for placeholder txn batching
|
||||
nsSelectionState mSavedSel; // cached selection for nsAutoSelectionReset
|
||||
nsRangeUpdater mRangeUpdater; // utility class object for maintaining preserved ranges
|
||||
nsCOMPtr<mozilla::dom::Element> mRootElement; // cached root node
|
||||
PRInt32 mAction; // the current editor action
|
||||
EDirection mDirection; // the current direction of editor action
|
||||
|
||||
// data necessary to build IME transactions
|
||||
nsCOMPtr<mozilla::dom::Element> mRootElement; // cached root node
|
||||
nsCOMPtr<nsIPrivateTextRangeList> mIMETextRangeList; // IME special selection ranges
|
||||
nsCOMPtr<nsIDOMCharacterData> mIMETextNode; // current IME text node
|
||||
PRUint32 mIMETextOffset; // offset in text node where IME comp string begins
|
||||
PRUint32 mIMEBufferLength; // current length of IME comp string
|
||||
bool mInIMEMode; // are we inside an IME composition?
|
||||
bool mIsIMEComposing; // is IME in composition state?
|
||||
// This is different from mInIMEMode. see Bug 98434.
|
||||
nsCOMPtr<nsIDOMEventTarget> mEventTarget; // The form field as an event receiver
|
||||
nsCOMPtr<nsIDOMEventListener> mEventListener;
|
||||
nsWeakPtr mSelConWeak; // weak reference to the nsISelectionController
|
||||
nsWeakPtr mPlaceHolderTxn; // weak reference to placeholder for begin/end batch purposes
|
||||
nsWeakPtr mDocWeak; // weak reference to the nsIDOMDocument
|
||||
nsIAtom *mPlaceHolderName; // name of placeholder transaction
|
||||
nsSelectionState *mSelState; // saved selection state for placeholder txn batching
|
||||
nsString *mPhonetic;
|
||||
|
||||
bool mShouldTxnSetSelection; // turn off for conservative selection adjustment by txns
|
||||
bool mDidPreDestroy; // whether PreDestroy has been called
|
||||
bool mDidPostCreate; // whether PostCreate has been called
|
||||
// various listeners
|
||||
// various listeners
|
||||
nsCOMArray<nsIEditActionListener> mActionListeners; // listens to all low level actions on the doc
|
||||
nsCOMArray<nsIEditorObserver> mEditorObservers; // just notify once per high level change
|
||||
nsCOMArray<nsIDocumentStateListener> mDocStateListeners;// listen to overall doc state (dirty or not, just created, etc)
|
||||
|
||||
PRInt8 mDocDirtyState; // -1 = not initialized
|
||||
nsWeakPtr mDocWeak; // weak reference to the nsIDOMDocument
|
||||
// The form field as an event receiver
|
||||
nsCOMPtr<nsIDOMEventTarget> mEventTarget;
|
||||
nsSelectionState mSavedSel; // cached selection for nsAutoSelectionReset
|
||||
nsRangeUpdater mRangeUpdater; // utility class object for maintaining preserved ranges
|
||||
|
||||
nsString* mPhonetic;
|
||||
PRUint32 mModCount; // number of modifications (for undo/redo stack)
|
||||
PRUint32 mFlags; // behavior flags. See nsIPlaintextEditor.idl for the flags we use.
|
||||
|
||||
nsCOMPtr<nsIDOMEventListener> mEventListener;
|
||||
PRInt32 mUpdateCount;
|
||||
|
||||
PRUint32 mHandlingActionCount;
|
||||
PRInt32 mPlaceHolderBatch; // nesting count for batching
|
||||
PRInt32 mAction; // the current editor action
|
||||
PRUint32 mHandlingActionCount;
|
||||
|
||||
PRUint32 mIMETextOffset; // offset in text node where IME comp string begins
|
||||
PRUint32 mIMEBufferLength; // current length of IME comp string
|
||||
|
||||
EDirection mDirection; // the current direction of editor action
|
||||
PRInt8 mDocDirtyState; // -1 = not initialized
|
||||
PRUint8 mSpellcheckCheckboxState; // a Tristate value
|
||||
|
||||
bool mInIMEMode; // are we inside an IME composition?
|
||||
bool mIsIMEComposing; // is IME in composition state?
|
||||
// This is different from mInIMEMode. see Bug 98434.
|
||||
|
||||
bool mShouldTxnSetSelection; // turn off for conservative selection adjustment by txns
|
||||
bool mDidPreDestroy; // whether PreDestroy has been called
|
||||
bool mDidPostCreate; // whether PostCreate has been called
|
||||
bool mHandlingTrustedAction;
|
||||
bool mDispatchInputEvent;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user