2001-09-25 22:53:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 14:21:17 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-02-12 17:18:58 +00:00
|
|
|
*
|
2004-04-18 14:21:17 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
1999-02-12 17:18:58 +00:00
|
|
|
*
|
2001-09-25 22:53:13 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-02-12 17:18:58 +00:00
|
|
|
*
|
1999-11-06 03:43:54 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 14:21:17 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-25 22:53:13 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 03:43:54 +00:00
|
|
|
*
|
2001-09-25 22:53:13 +00:00
|
|
|
* Contributor(s):
|
2002-01-09 13:51:37 +00:00
|
|
|
* Daniel Glazman <glazman@netscape.com>
|
2001-09-25 22:53:13 +00:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-18 14:21:17 +00:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-25 22:53:13 +00:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-18 14:21:17 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-25 22:53:13 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-18 14:21:17 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-25 22:53:13 +00:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-02-12 17:18:58 +00:00
|
|
|
|
|
|
|
#ifndef __editor_h__
|
|
|
|
#define __editor_h__
|
|
|
|
|
1999-08-09 01:37:50 +00:00
|
|
|
#include "nsCOMPtr.h"
|
2000-04-27 07:37:12 +00:00
|
|
|
#include "nsWeakReference.h"
|
1999-08-09 01:37:50 +00:00
|
|
|
|
1999-02-12 17:18:58 +00:00
|
|
|
#include "nsIEditor.h"
|
1999-08-09 01:37:50 +00:00
|
|
|
#include "nsIEditorIMESupport.h"
|
2002-12-17 23:38:04 +00:00
|
|
|
#include "nsIPhonetic.h"
|
2004-09-12 05:00:57 +00:00
|
|
|
#include "nsIKBStateControl.h"
|
1999-08-09 01:37:50 +00:00
|
|
|
|
2003-07-15 13:47:15 +00:00
|
|
|
#include "nsIAtom.h"
|
1999-02-12 17:18:58 +00:00
|
|
|
#include "nsIDOMDocument.h"
|
2000-09-14 11:45:01 +00:00
|
|
|
#include "nsISelection.h"
|
1999-07-01 18:42:28 +00:00
|
|
|
#include "nsIDOMCharacterData.h"
|
1999-08-06 02:32:13 +00:00
|
|
|
#include "nsIPrivateTextRange.h"
|
1999-02-12 17:18:58 +00:00
|
|
|
#include "nsITransactionManager.h"
|
1999-03-09 09:44:27 +00:00
|
|
|
#include "nsIComponentManager.h"
|
1999-07-28 02:55:40 +00:00
|
|
|
#include "nsISupportsArray.h"
|
1999-07-02 05:20:31 +00:00
|
|
|
#include "nsICSSStyleSheet.h"
|
1999-07-19 22:49:21 +00:00
|
|
|
#include "nsIDTD.h"
|
2000-01-10 10:44:18 +00:00
|
|
|
#include "nsIDOMElement.h"
|
2001-01-28 20:13:07 +00:00
|
|
|
#include "nsSelectionState.h"
|
2005-02-01 21:12:53 +00:00
|
|
|
#include "nsIEditorSpellCheck.h"
|
|
|
|
#include "nsIInlineSpellChecker.h"
|
1999-02-12 17:18:58 +00:00
|
|
|
|
1999-04-27 17:14:28 +00:00
|
|
|
class nsIEditActionListener;
|
1999-07-28 02:55:40 +00:00
|
|
|
class nsIDocumentStateListener;
|
1999-02-12 17:18:58 +00:00
|
|
|
class nsIDOMCharacterData;
|
|
|
|
class nsIDOMRange;
|
|
|
|
class nsIPresShell;
|
|
|
|
class nsIViewManager;
|
|
|
|
class ChangeAttributeTxn;
|
|
|
|
class CreateElementTxn;
|
1999-02-24 17:24:37 +00:00
|
|
|
class InsertElementTxn;
|
1999-02-12 17:18:58 +00:00
|
|
|
class DeleteElementTxn;
|
|
|
|
class InsertTextTxn;
|
|
|
|
class DeleteTextTxn;
|
|
|
|
class SplitElementTxn;
|
|
|
|
class JoinElementTxn;
|
|
|
|
class EditAggregateTxn;
|
|
|
|
class nsVoidArray;
|
1999-05-05 04:05:19 +00:00
|
|
|
class nsISupportsArray;
|
1999-06-09 01:27:08 +00:00
|
|
|
class nsILocale;
|
1999-06-29 20:31:22 +00:00
|
|
|
class IMETextTxn;
|
1999-07-02 03:57:50 +00:00
|
|
|
class AddStyleSheetTxn;
|
|
|
|
class RemoveStyleSheetTxn;
|
2001-01-09 22:47:02 +00:00
|
|
|
class nsIFile;
|
2000-04-28 06:20:36 +00:00
|
|
|
class nsISelectionController;
|
|
|
|
|
2001-11-14 01:33:42 +00:00
|
|
|
#define kMOZEditorBogusNodeAttr NS_LITERAL_STRING("_moz_editor_bogus_node")
|
|
|
|
#define kMOZEditorBogusNodeValue NS_LITERAL_STRING("TRUE")
|
|
|
|
|
2000-03-24 00:26:47 +00:00
|
|
|
/** implementation of an editor object. it will be the controller/focal point
|
1999-02-12 17:18:58 +00:00
|
|
|
* for the main editor services. i.e. the GUIManager, publishing, transaction
|
|
|
|
* manager, event interfaces. the idea for the event interfaces is to have them
|
|
|
|
* delegate the actual commands to the editor independent of the XPFE implementation.
|
|
|
|
*/
|
1999-08-09 01:37:50 +00:00
|
|
|
class nsEditor : public nsIEditor,
|
2000-04-27 07:37:12 +00:00
|
|
|
public nsIEditorIMESupport,
|
2002-12-17 23:38:04 +00:00
|
|
|
public nsSupportsWeakReference,
|
|
|
|
public nsIPhonetic
|
1999-02-12 17:18:58 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-05-05 04:05:19 +00:00
|
|
|
|
1999-05-17 12:22:31 +00:00
|
|
|
enum IterDirection
|
|
|
|
{
|
|
|
|
kIterForward,
|
|
|
|
kIterBackward
|
|
|
|
};
|
|
|
|
|
1999-12-07 08:30:19 +00:00
|
|
|
enum OperationID
|
|
|
|
{
|
|
|
|
kOpIgnore = -1,
|
|
|
|
kOpNone = 0,
|
|
|
|
kOpUndo,
|
|
|
|
kOpRedo,
|
|
|
|
kOpInsertNode,
|
|
|
|
kOpCreateNode,
|
|
|
|
kOpDeleteNode,
|
|
|
|
kOpSplitNode,
|
|
|
|
kOpJoinNode,
|
Checking in for bug 50742, this change removes the use of XIF in mozilla and replaces the XIF converter with a HTML (and XML) serializer.
Contextual information added to HTML copy and intelligence added to HTML paste in the editor (fixes bugs 47014, 50568 and 46554, and partly (at least) fixes bug 53188).
Code written by vidur, jfrancis, jst, akkana. Tested by jfrancis, akkana, vidur, jst, kin. Reviwed (and super reviewed) by waterson, vidur, kin, jfrancis, jst
2000-10-07 10:57:30 +00:00
|
|
|
kOpDeleteSelection,
|
2001-01-28 20:13:07 +00:00
|
|
|
// text commands
|
|
|
|
kOpInsertBreak = 1000,
|
|
|
|
kOpInsertText = 1001,
|
|
|
|
kOpInsertIMEText = 1002,
|
|
|
|
kOpDeleteText = 1003
|
1999-12-07 08:30:19 +00:00
|
|
|
};
|
|
|
|
|
1999-02-12 17:18:58 +00:00
|
|
|
/** The default constructor. This should suffice. the setting of the interfaces is done
|
|
|
|
* after the construction of the editor class.
|
|
|
|
*/
|
|
|
|
nsEditor();
|
|
|
|
/** The default destructor. This should suffice. Should this be pure virtual
|
|
|
|
* for someone to derive from the nsEditor later? I dont believe so.
|
|
|
|
*/
|
|
|
|
virtual ~nsEditor();
|
|
|
|
|
1999-03-05 21:05:35 +00:00
|
|
|
//Interfaces for addref and release and queryinterface
|
1999-04-13 01:33:32 +00:00
|
|
|
//NOTE: Use NS_DECL_ISUPPORTS_INHERITED in any class inherited from nsEditor
|
1999-02-12 17:18:58 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2001-04-07 00:45:26 +00:00
|
|
|
/* ------------ utility methods -------------- */
|
1999-08-09 01:37:50 +00:00
|
|
|
NS_IMETHOD GetPresShell(nsIPresShell **aPS);
|
2001-04-07 00:45:26 +00:00
|
|
|
void NotifyEditorObservers(void);
|
2002-01-09 13:51:37 +00:00
|
|
|
|
2001-04-07 00:45:26 +00:00
|
|
|
/* ------------ nsIEditor methods -------------- */
|
|
|
|
NS_DECL_NSIEDITOR
|
1999-08-09 01:37:50 +00:00
|
|
|
/* ------------ nsIEditorIMESupport methods -------------- */
|
2004-09-12 05:00:57 +00:00
|
|
|
NS_DECL_NSIEDITORIMESUPPORT
|
2002-12-17 23:38:04 +00:00
|
|
|
|
|
|
|
// nsIPhonetic
|
|
|
|
NS_DECL_NSIPHONETIC
|
|
|
|
|
1999-08-09 01:37:50 +00:00
|
|
|
|
|
|
|
public:
|
1999-02-12 17:18:58 +00:00
|
|
|
|
1999-07-02 03:57:50 +00:00
|
|
|
|
2002-03-23 22:16:54 +00:00
|
|
|
NS_IMETHOD InsertTextImpl(const nsAString& aStringToInsert,
|
2000-03-24 00:26:47 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> *aInOutNode,
|
|
|
|
PRInt32 *aInOutOffset,
|
|
|
|
nsIDOMDocument *aDoc);
|
2002-03-23 22:16:54 +00:00
|
|
|
NS_IMETHOD InsertTextIntoTextNodeImpl(const nsAString& aStringToInsert,
|
2000-03-24 00:26:47 +00:00
|
|
|
nsIDOMCharacterData *aTextNode,
|
2002-04-06 19:07:47 +00:00
|
|
|
PRInt32 aOffset, PRBool suppressIME=PR_FALSE);
|
1999-12-07 08:30:19 +00:00
|
|
|
NS_IMETHOD DeleteSelectionImpl(EDirection aAction);
|
2002-03-23 22:16:54 +00:00
|
|
|
NS_IMETHOD DeleteSelectionAndCreateNode(const nsAString& aTag,
|
2001-01-28 20:13:07 +00:00
|
|
|
nsIDOMNode ** aNewNode);
|
1999-08-09 01:37:50 +00:00
|
|
|
|
2000-03-24 00:26:47 +00:00
|
|
|
/* helper routines for node/parent manipulations */
|
|
|
|
nsresult ReplaceContainer(nsIDOMNode *inNode,
|
|
|
|
nsCOMPtr<nsIDOMNode> *outNode,
|
2002-03-23 22:16:54 +00:00
|
|
|
const nsAString &aNodeType,
|
|
|
|
const nsAString *aAttribute = nsnull,
|
|
|
|
const nsAString *aValue = nsnull,
|
2000-06-22 05:39:54 +00:00
|
|
|
PRBool aCloneAttributes = PR_FALSE);
|
|
|
|
|
2000-03-24 00:26:47 +00:00
|
|
|
nsresult RemoveContainer(nsIDOMNode *inNode);
|
|
|
|
nsresult InsertContainerAbove(nsIDOMNode *inNode,
|
|
|
|
nsCOMPtr<nsIDOMNode> *outNode,
|
2002-03-23 22:16:54 +00:00
|
|
|
const nsAString &aNodeType,
|
|
|
|
const nsAString *aAttribute = nsnull,
|
|
|
|
const nsAString *aValue = nsnull);
|
2000-03-24 00:26:47 +00:00
|
|
|
nsresult MoveNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aOffset);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
2000-07-13 23:15:41 +00:00
|
|
|
/* Method to replace certain CreateElementNS() calls.
|
|
|
|
Arguments:
|
|
|
|
nsString& aTag - tag you want
|
|
|
|
nsIContent** aContent - returned Content that was created with above namespace.
|
|
|
|
*/
|
2002-03-23 22:16:54 +00:00
|
|
|
nsresult CreateHTMLContent(const nsAString& aTag, nsIContent** aContent);
|
2000-07-13 23:15:41 +00:00
|
|
|
|
1999-02-12 17:18:58 +00:00
|
|
|
protected:
|
1999-08-09 01:37:50 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
NS_IMETHOD SetProperties(nsVoidArray *aPropList);
|
|
|
|
NS_IMETHOD GetProperties(nsVoidArray *aPropList);
|
|
|
|
*/
|
|
|
|
|
2002-09-18 19:42:38 +00:00
|
|
|
nsCString mContentMIMEType; // MIME type of the doc we are editing.
|
|
|
|
|
1999-03-10 19:48:13 +00:00
|
|
|
/** create a transaction for setting aAttribute to aValue on aElement
|
|
|
|
*/
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForSetAttribute(nsIDOMElement *aElement,
|
2002-03-23 22:16:54 +00:00
|
|
|
const nsAString & aAttribute,
|
|
|
|
const nsAString & aValue,
|
1999-03-02 05:30:53 +00:00
|
|
|
ChangeAttributeTxn ** aTxn);
|
|
|
|
|
1999-03-10 19:48:13 +00:00
|
|
|
/** create a transaction for removing aAttribute on aElement
|
|
|
|
*/
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForRemoveAttribute(nsIDOMElement *aElement,
|
2002-03-23 22:16:54 +00:00
|
|
|
const nsAString & aAttribute,
|
1999-03-02 05:30:53 +00:00
|
|
|
ChangeAttributeTxn ** aTxn);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
1999-03-10 19:48:13 +00:00
|
|
|
/** create a transaction for creating a new child node of aParent of type aTag.
|
|
|
|
*/
|
2002-03-23 22:16:54 +00:00
|
|
|
NS_IMETHOD CreateTxnForCreateElement(const nsAString & aTag,
|
1999-03-02 05:30:53 +00:00
|
|
|
nsIDOMNode *aParent,
|
|
|
|
PRInt32 aPosition,
|
|
|
|
CreateElementTxn ** aTxn);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
1999-03-10 19:48:13 +00:00
|
|
|
/** create a transaction for inserting aNode as a child of aParent.
|
|
|
|
*/
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForInsertElement(nsIDOMNode * aNode,
|
|
|
|
nsIDOMNode * aParent,
|
|
|
|
PRInt32 aOffset,
|
|
|
|
InsertElementTxn ** aTxn);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
1999-03-10 19:48:13 +00:00
|
|
|
/** create a transaction for removing aElement from its parent.
|
|
|
|
*/
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForDeleteElement(nsIDOMNode * aElement,
|
|
|
|
DeleteElementTxn ** aTxn);
|
1999-02-24 17:24:37 +00:00
|
|
|
|
1999-08-09 01:37:50 +00:00
|
|
|
|
1999-12-07 08:30:19 +00:00
|
|
|
NS_IMETHOD CreateTxnForDeleteSelection(EDirection aAction,
|
1999-08-09 01:37:50 +00:00
|
|
|
EditAggregateTxn ** aTxn);
|
|
|
|
|
|
|
|
NS_IMETHOD CreateTxnForDeleteInsertionPoint(nsIDOMRange *aRange,
|
1999-12-07 08:30:19 +00:00
|
|
|
EDirection aAction,
|
1999-08-09 01:37:50 +00:00
|
|
|
EditAggregateTxn *aTxn);
|
|
|
|
|
|
|
|
|
1999-03-10 19:48:13 +00:00
|
|
|
/** create a transaction for inserting aStringToInsert into aTextNode
|
|
|
|
* if aTextNode is null, the string is inserted at the current selection.
|
|
|
|
*/
|
2002-03-23 22:16:54 +00:00
|
|
|
NS_IMETHOD CreateTxnForInsertText(const nsAString & aStringToInsert,
|
1999-03-10 19:48:13 +00:00
|
|
|
nsIDOMCharacterData *aTextNode,
|
1999-10-26 18:54:47 +00:00
|
|
|
PRInt32 aOffset,
|
1999-03-02 05:30:53 +00:00
|
|
|
InsertTextTxn ** aTxn);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
2002-03-23 22:16:54 +00:00
|
|
|
NS_IMETHOD CreateTxnForIMEText(const nsAString & aStringToInsert,
|
1999-06-29 20:31:22 +00:00
|
|
|
IMETextTxn ** aTxn);
|
|
|
|
|
1999-07-02 03:57:50 +00:00
|
|
|
/** create a transaction for adding a style sheet
|
|
|
|
*/
|
|
|
|
NS_IMETHOD CreateTxnForAddStyleSheet(nsICSSStyleSheet* aSheet, AddStyleSheetTxn* *aTxn);
|
|
|
|
|
|
|
|
/** create a transaction for removing a style sheet
|
|
|
|
*/
|
|
|
|
NS_IMETHOD CreateTxnForRemoveStyleSheet(nsICSSStyleSheet* aSheet, RemoveStyleSheetTxn* *aTxn);
|
|
|
|
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD DeleteText(nsIDOMCharacterData *aElement,
|
|
|
|
PRUint32 aOffset,
|
|
|
|
PRUint32 aLength);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
2001-05-11 12:43:22 +00:00
|
|
|
// NS_IMETHOD DeleteRange(nsIDOMRange *aRange);
|
|
|
|
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForDeleteText(nsIDOMCharacterData *aElement,
|
|
|
|
PRUint32 aOffset,
|
|
|
|
PRUint32 aLength,
|
|
|
|
DeleteTextTxn **aTxn);
|
1999-08-09 01:37:50 +00:00
|
|
|
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForSplitNode(nsIDOMNode *aNode,
|
|
|
|
PRUint32 aOffset,
|
|
|
|
SplitElementTxn **aTxn);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
1999-03-02 05:30:53 +00:00
|
|
|
NS_IMETHOD CreateTxnForJoinNode(nsIDOMNode *aLeftNode,
|
|
|
|
nsIDOMNode *aRightNode,
|
|
|
|
JoinElementTxn **aTxn);
|
1999-02-17 19:42:29 +00:00
|
|
|
|
2001-01-28 20:13:07 +00:00
|
|
|
NS_IMETHOD DeleteSelectionAndPrepareToCreateNode(nsCOMPtr<nsIDOMNode> &parentSelectedNode,
|
|
|
|
PRInt32& offsetOfNewNode);
|
1999-04-04 18:01:35 +00:00
|
|
|
|
1999-05-27 04:10:04 +00:00
|
|
|
// called after a transaction is done successfully
|
|
|
|
NS_IMETHOD DoAfterDoTransaction(nsITransaction *aTxn);
|
|
|
|
// called after a transaction is undone successfully
|
|
|
|
NS_IMETHOD DoAfterUndoTransaction();
|
1999-07-14 22:29:39 +00:00
|
|
|
// called after a transaction is redone successfully
|
|
|
|
NS_IMETHOD DoAfterRedoTransaction();
|
2002-01-14 20:25:29 +00:00
|
|
|
|
1999-08-03 00:58:38 +00:00
|
|
|
typedef enum {
|
|
|
|
eDocumentCreated,
|
|
|
|
eDocumentToBeDestroyed,
|
|
|
|
eDocumentStateChanged
|
|
|
|
} TDocumentListenerNotification;
|
|
|
|
|
1999-07-28 02:55:40 +00:00
|
|
|
// tell the doc state listeners that the doc state has changed
|
1999-08-03 00:58:38 +00:00
|
|
|
NS_IMETHOD NotifyDocumentListeners(TDocumentListenerNotification aNotificationType);
|
1999-07-28 02:55:40 +00:00
|
|
|
|
1999-06-25 22:57:26 +00:00
|
|
|
/** make the given selection span the entire document */
|
2000-09-14 11:45:01 +00:00
|
|
|
NS_IMETHOD SelectEntireDocument(nsISelection *aSelection);
|
2001-01-08 21:01:29 +00:00
|
|
|
|
|
|
|
/* Helper for output routines -- we expect subclasses to override this */
|
|
|
|
NS_IMETHOD GetWrapWidth(PRInt32* aWrapCol);
|
|
|
|
|
2002-06-13 20:35:12 +00:00
|
|
|
/** helper method for scrolling the selection into view after
|
|
|
|
* an edit operation. aScrollToAnchor should be PR_TRUE if you
|
|
|
|
* want to scroll to the point where the selection was started.
|
|
|
|
* If PR_FALSE, it attempts to scroll the end of the selection into view.
|
|
|
|
*
|
|
|
|
* Editor methods *should* call this method instead of the versions
|
|
|
|
* in the various selection interfaces, since this version makes sure
|
|
|
|
* that the editor's sync/async settings for reflowing, painting, and
|
|
|
|
* scrolling match.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD ScrollSelectionIntoView(PRBool aScrollToAnchor);
|
1999-03-14 00:31:35 +00:00
|
|
|
|
2001-12-09 09:24:33 +00:00
|
|
|
// stub. see comment in source.
|
|
|
|
virtual PRBool IsBlockNode(nsIDOMNode *aNode);
|
|
|
|
|
|
|
|
// helper for GetPriorNode
|
|
|
|
nsresult GetPriorNodeImpl(nsIDOMNode *aCurrentNode,
|
|
|
|
PRBool aEditableNode,
|
|
|
|
nsCOMPtr<nsIDOMNode> *aResultNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
|
|
|
|
|
|
|
// helper for GetNextNode
|
|
|
|
nsresult GetNextNodeImpl(nsIDOMNode *aCurrentNode,
|
|
|
|
PRBool aEditableNode,
|
|
|
|
nsCOMPtr<nsIDOMNode> *aResultNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
|
|
|
|
2004-09-12 05:00:57 +00:00
|
|
|
// Get nsIKBStateControl interface
|
|
|
|
nsresult GetKBStateControl(nsIKBStateControl **aKBSC);
|
1999-05-05 04:05:19 +00:00
|
|
|
public:
|
1999-08-09 01:37:50 +00:00
|
|
|
|
1999-12-07 08:30:19 +00:00
|
|
|
/** All editor operations which alter the doc should be prefaced
|
|
|
|
* with a call to StartOperation, naming the action and direction */
|
|
|
|
NS_IMETHOD StartOperation(PRInt32 opID, nsIEditor::EDirection aDirection);
|
|
|
|
|
|
|
|
/** All editor operations which alter the doc should be followed
|
2000-08-14 02:39:37 +00:00
|
|
|
* with a call to EndOperation */
|
|
|
|
NS_IMETHOD EndOperation();
|
1999-12-07 08:30:19 +00:00
|
|
|
|
2000-08-26 04:03:50 +00:00
|
|
|
/** routines for managing the preservation of selection across
|
|
|
|
* various editor actions */
|
|
|
|
PRBool ArePreservingSelection();
|
2000-09-14 11:45:01 +00:00
|
|
|
nsresult PreserveSelectionAcrossActions(nsISelection *aSel);
|
|
|
|
nsresult RestorePreservedSelection(nsISelection *aSel);
|
2000-08-26 04:03:50 +00:00
|
|
|
void StopPreservingSelection();
|
|
|
|
|
|
|
|
|
1999-08-30 22:12:11 +00:00
|
|
|
/** return the string that represents text nodes in the content tree */
|
2002-03-23 22:16:54 +00:00
|
|
|
static nsresult GetTextNodeTag(nsAString& aOutString);
|
1999-08-09 01:37:50 +00:00
|
|
|
|
1999-05-05 04:05:19 +00:00
|
|
|
/**
|
|
|
|
* SplitNode() creates a new node identical to an existing node, and split the contents between the two nodes
|
|
|
|
* @param aExistingRightNode the node to split. It will become the new node's next sibling.
|
|
|
|
* @param aOffset the offset of aExistingRightNode's content|children to do the split at
|
|
|
|
* @param aNewLeftNode [OUT] the new node resulting from the split, becomes aExistingRightNode's previous sibling.
|
|
|
|
* @param aParent the parent of aExistingRightNode
|
|
|
|
*/
|
2000-01-04 03:09:41 +00:00
|
|
|
nsresult SplitNodeImpl(nsIDOMNode *aExistingRightNode,
|
|
|
|
PRInt32 aOffset,
|
|
|
|
nsIDOMNode *aNewLeftNode,
|
|
|
|
nsIDOMNode *aParent);
|
1999-05-05 04:05:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* JoinNodes() takes 2 nodes and merge their content|children.
|
|
|
|
* @param aNodeToKeep The node that will remain after the join.
|
|
|
|
* @param aNodeToJoin The node that will be joined with aNodeToKeep.
|
|
|
|
* There is no requirement that the two nodes be of the same type.
|
1999-08-19 13:30:48 +00:00
|
|
|
* @param aParent The parent of aNodeToKeep
|
1999-05-05 04:05:19 +00:00
|
|
|
* @param aNodeToKeepIsFirst if PR_TRUE, the contents|children of aNodeToKeep come before the
|
|
|
|
* contents|children of aNodeToJoin, otherwise their positions are switched.
|
|
|
|
*/
|
2000-01-04 03:09:41 +00:00
|
|
|
nsresult JoinNodesImpl(nsIDOMNode *aNodeToKeep,
|
|
|
|
nsIDOMNode *aNodeToJoin,
|
|
|
|
nsIDOMNode *aParent,
|
|
|
|
PRBool aNodeToKeepIsFirst);
|
1999-05-05 04:05:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set aOffset to the offset of aChild in aParent.
|
|
|
|
* Returns an error if aChild is not an immediate child of aParent.
|
|
|
|
*/
|
|
|
|
static nsresult GetChildOffset(nsIDOMNode *aChild,
|
|
|
|
nsIDOMNode *aParent,
|
|
|
|
PRInt32 &aOffset);
|
|
|
|
|
1999-06-16 05:02:43 +00:00
|
|
|
/**
|
|
|
|
* Set aParent to the parent of aChild.
|
|
|
|
* Set aOffset to the offset of aChild in aParent.
|
|
|
|
*/
|
|
|
|
static nsresult GetNodeLocation(nsIDOMNode *aChild,
|
|
|
|
nsCOMPtr<nsIDOMNode> *aParent,
|
|
|
|
PRInt32 *aOffset);
|
|
|
|
|
1999-05-05 04:05:19 +00:00
|
|
|
/** returns the number of things inside aNode in the out-param aCount.
|
|
|
|
* @param aNode is the node to get the length of.
|
|
|
|
* If aNode is text, returns number of characters.
|
|
|
|
* If not, returns number of children nodes.
|
|
|
|
* @param aCount [OUT] the result of the above calculation.
|
|
|
|
*/
|
|
|
|
static nsresult GetLengthOfDOMNode(nsIDOMNode *aNode, PRUint32 &aCount);
|
|
|
|
|
1999-05-05 04:51:54 +00:00
|
|
|
/** get the node immediately prior to aCurrentNode
|
|
|
|
* @param aCurrentNode the node from which we start the search
|
|
|
|
* @param aEditableNode if PR_TRUE, only return an editable node
|
|
|
|
* @param aResultNode [OUT] the node that occurs before aCurrentNode in the tree,
|
|
|
|
* skipping non-editable nodes if aEditableNode is PR_TRUE.
|
|
|
|
* If there is no prior node, aResultNode will be nsnull.
|
|
|
|
*/
|
1999-07-01 18:42:28 +00:00
|
|
|
nsresult GetPriorNode(nsIDOMNode *aCurrentNode,
|
|
|
|
PRBool aEditableNode,
|
2001-08-22 05:32:44 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> *aResultNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
1999-05-05 04:51:54 +00:00
|
|
|
|
1999-08-31 13:55:18 +00:00
|
|
|
// and another version that takes a {parent,offset} pair rather than a node
|
|
|
|
nsresult GetPriorNode(nsIDOMNode *aParentNode,
|
|
|
|
PRInt32 aOffset,
|
|
|
|
PRBool aEditableNode,
|
2001-08-22 05:32:44 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> *aResultNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
1999-08-31 13:55:18 +00:00
|
|
|
|
1999-05-05 04:51:54 +00:00
|
|
|
/** get the node immediately after to aCurrentNode
|
|
|
|
* @param aCurrentNode the node from which we start the search
|
|
|
|
* @param aEditableNode if PR_TRUE, only return an editable node
|
|
|
|
* @param aResultNode [OUT] the node that occurs after aCurrentNode in the tree,
|
|
|
|
* skipping non-editable nodes if aEditableNode is PR_TRUE.
|
|
|
|
* If there is no prior node, aResultNode will be nsnull.
|
|
|
|
*/
|
1999-07-01 18:42:28 +00:00
|
|
|
nsresult GetNextNode(nsIDOMNode *aCurrentNode,
|
|
|
|
PRBool aEditableNode,
|
2001-08-22 05:32:44 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> *aResultNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
1999-05-05 04:05:19 +00:00
|
|
|
|
1999-08-31 13:55:18 +00:00
|
|
|
// and another version that takes a {parent,offset} pair rather than a node
|
|
|
|
nsresult GetNextNode(nsIDOMNode *aParentNode,
|
|
|
|
PRInt32 aOffset,
|
|
|
|
PRBool aEditableNode,
|
2001-08-22 05:32:44 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> *aResultNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
|
|
|
|
|
|
|
/** Get the rightmost child of aCurrentNode;
|
|
|
|
* return nsnull if aCurrentNode has no children.
|
1999-05-05 04:51:54 +00:00
|
|
|
*/
|
2001-08-22 05:32:44 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> GetRightmostChild(nsIDOMNode *aCurrentNode,
|
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
1999-05-05 04:05:19 +00:00
|
|
|
|
2001-08-22 05:32:44 +00:00
|
|
|
/** Get the leftmost child of aCurrentNode;
|
|
|
|
* return nsnull if aCurrentNode has no children.
|
1999-05-05 04:51:54 +00:00
|
|
|
*/
|
2001-08-22 05:32:44 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> GetLeftmostChild(nsIDOMNode *aCurrentNode,
|
2002-05-14 00:05:37 +00:00
|
|
|
PRBool bNoBlockCrossing = PR_FALSE);
|
1999-05-05 04:05:19 +00:00
|
|
|
|
|
|
|
/** returns PR_TRUE if aNode is of the type implied by aTag */
|
2003-07-15 13:47:15 +00:00
|
|
|
static inline PRBool NodeIsType(nsIDOMNode *aNode, nsIAtom *aTag)
|
|
|
|
{
|
2003-11-19 01:20:56 +00:00
|
|
|
return GetTag(aNode) == aTag;
|
2003-07-15 13:47:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// we should get rid of this method if we can
|
|
|
|
static inline PRBool NodeIsTypeString(nsIDOMNode *aNode, const nsAString &aTag)
|
|
|
|
{
|
2003-11-19 01:20:56 +00:00
|
|
|
nsIAtom *nodeAtom = GetTag(aNode);
|
2003-07-15 13:47:15 +00:00
|
|
|
return nodeAtom && nodeAtom->Equals(aTag);
|
|
|
|
}
|
|
|
|
|
1999-05-05 04:05:19 +00:00
|
|
|
|
1999-07-19 22:49:21 +00:00
|
|
|
/** returns PR_TRUE if aParent can contain a child of type aTag */
|
2002-03-23 22:16:54 +00:00
|
|
|
PRBool CanContainTag(nsIDOMNode* aParent, const nsAString &aTag);
|
|
|
|
PRBool TagCanContain(const nsAString &aParentTag, nsIDOMNode* aChild);
|
|
|
|
virtual PRBool TagCanContainTag(const nsAString &aParentTag, const nsAString &aChildTag);
|
2000-02-08 12:53:34 +00:00
|
|
|
|
2001-08-28 18:21:12 +00:00
|
|
|
/** returns PR_TRUE if aNode is our root node */
|
|
|
|
PRBool IsRootNode(nsIDOMNode *inNode);
|
|
|
|
|
2000-05-09 21:06:49 +00:00
|
|
|
/** returns PR_TRUE if aNode is a descendant of our root node */
|
|
|
|
PRBool IsDescendantOfBody(nsIDOMNode *inNode);
|
|
|
|
|
1999-09-29 20:08:15 +00:00
|
|
|
/** returns PR_TRUE if aNode is a container */
|
|
|
|
PRBool IsContainer(nsIDOMNode *aNode);
|
|
|
|
|
1999-05-05 04:05:19 +00:00
|
|
|
/** returns PR_TRUE if aNode is an editable node */
|
1999-07-01 18:42:28 +00:00
|
|
|
PRBool IsEditable(nsIDOMNode *aNode);
|
1999-05-05 04:05:19 +00:00
|
|
|
|
2003-06-11 11:50:36 +00:00
|
|
|
virtual PRBool IsTextInDirtyFrameVisible(nsIDOMNode *aNode);
|
|
|
|
|
2000-01-18 23:45:35 +00:00
|
|
|
/** returns PR_TRUE if aNode is a MozEditorBogus node */
|
|
|
|
PRBool IsMozEditorBogusNode(nsIDOMNode *aNode);
|
|
|
|
|
1999-09-29 20:08:15 +00:00
|
|
|
/** returns PR_TRUE if content is an merely formatting whitespacce */
|
|
|
|
PRBool IsEmptyTextContent(nsIContent* aContent);
|
|
|
|
|
1999-06-25 09:33:02 +00:00
|
|
|
/** counts number of editable child nodes */
|
1999-07-01 18:42:28 +00:00
|
|
|
nsresult CountEditableChildren(nsIDOMNode *aNode, PRUint32 &outCount);
|
1999-06-25 09:33:02 +00:00
|
|
|
|
1999-09-22 01:23:58 +00:00
|
|
|
/** Find the deep first and last children. Returned nodes are AddReffed */
|
1999-11-17 11:03:25 +00:00
|
|
|
nsresult GetFirstEditableNode(nsIDOMNode *aRoot, nsCOMPtr<nsIDOMNode> *outFirstNode);
|
2002-01-14 20:25:29 +00:00
|
|
|
#ifdef XXX_DEAD_CODE
|
1999-11-17 11:03:25 +00:00
|
|
|
nsresult GetLastEditableNode(nsIDOMNode *aRoot, nsCOMPtr<nsIDOMNode> *outLastNode);
|
2002-01-14 20:25:29 +00:00
|
|
|
#endif
|
1999-06-22 21:42:44 +00:00
|
|
|
|
2002-12-22 01:51:14 +00:00
|
|
|
nsresult GetIMEBufferLength(PRInt32* length);
|
|
|
|
PRBool IsIMEComposing(); /* test if IME is in composition state */
|
|
|
|
void SetIsIMEComposing(); /* call this before |IsIMEComposing()| */
|
1999-06-22 21:42:44 +00:00
|
|
|
|
1999-05-17 12:22:31 +00:00
|
|
|
/** from html rules code - migration in progress */
|
2002-03-23 22:16:54 +00:00
|
|
|
static nsresult GetTagString(nsIDOMNode *aNode, nsAString& outString);
|
2003-11-19 01:20:56 +00:00
|
|
|
static nsIAtom *GetTag(nsIDOMNode *aNode);
|
2002-01-09 13:51:37 +00:00
|
|
|
virtual PRBool NodesSameType(nsIDOMNode *aNode1, nsIDOMNode *aNode2);
|
1999-05-17 12:22:31 +00:00
|
|
|
static PRBool IsTextOrElementNode(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsTextNode(nsIDOMNode *aNode);
|
|
|
|
|
|
|
|
static PRInt32 GetIndexOf(nsIDOMNode *aParent, nsIDOMNode *aChild);
|
|
|
|
static nsCOMPtr<nsIDOMNode> GetChildAt(nsIDOMNode *aParent, PRInt32 aOffset);
|
|
|
|
|
2000-09-14 11:45:01 +00:00
|
|
|
static nsresult GetStartNodeAndOffset(nsISelection *aSelection, nsCOMPtr<nsIDOMNode> *outStartNode, PRInt32 *outStartOffset);
|
|
|
|
static nsresult GetEndNodeAndOffset(nsISelection *aSelection, nsCOMPtr<nsIDOMNode> *outEndNode, PRInt32 *outEndOffset);
|
2002-11-22 03:30:59 +00:00
|
|
|
#if DEBUG_JOE
|
|
|
|
static void DumpNode(nsIDOMNode *aNode, PRInt32 indent=0);
|
|
|
|
#endif
|
1999-06-09 01:27:08 +00:00
|
|
|
|
2000-02-10 05:14:52 +00:00
|
|
|
// Helpers to add a node to the selection.
|
|
|
|
// Used by table cell selection methods
|
|
|
|
nsresult CreateRange(nsIDOMNode *aStartParent, PRInt32 aStartOffset,
|
|
|
|
nsIDOMNode *aEndParent, PRInt32 aEndOffset,
|
|
|
|
nsIDOMRange **aRange);
|
2002-01-14 20:25:29 +00:00
|
|
|
|
2000-02-10 05:14:52 +00:00
|
|
|
// Creates a range with just the supplied node and appends that to the selection
|
|
|
|
nsresult AppendNodeToSelectionAsRange(nsIDOMNode *aNode);
|
|
|
|
// When you are using AppendNodeToSelectionAsRange, call this first to start a new selection
|
|
|
|
nsresult ClearSelection();
|
|
|
|
|
1999-05-17 12:22:31 +00:00
|
|
|
nsresult IsPreformatted(nsIDOMNode *aNode, PRBool *aResult);
|
|
|
|
|
2000-04-24 11:51:12 +00:00
|
|
|
nsresult SplitNodeDeep(nsIDOMNode *aNode,
|
|
|
|
nsIDOMNode *aSplitPointParent,
|
|
|
|
PRInt32 aSplitPointOffset,
|
|
|
|
PRInt32 *outOffset,
|
2000-08-26 04:03:50 +00:00
|
|
|
PRBool aNoEmptyContainers = PR_FALSE,
|
2000-04-24 11:51:12 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> *outLeftNode = 0,
|
|
|
|
nsCOMPtr<nsIDOMNode> *outRightNode = 0);
|
1999-08-31 13:55:18 +00:00
|
|
|
nsresult JoinNodeDeep(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsCOMPtr<nsIDOMNode> *aOutJoinNode, PRInt32 *outOffset);
|
|
|
|
|
2002-03-23 22:16:54 +00:00
|
|
|
nsresult GetString(const nsAString& name, nsAString& value);
|
1999-05-03 22:57:48 +00:00
|
|
|
|
1999-06-14 20:02:46 +00:00
|
|
|
nsresult BeginUpdateViewBatch(void);
|
2003-03-25 15:24:08 +00:00
|
|
|
virtual nsresult EndUpdateViewBatch(void);
|
1999-02-12 17:18:58 +00:00
|
|
|
|
2000-01-04 03:09:41 +00:00
|
|
|
PRBool GetShouldTxnSetSelection();
|
1999-02-12 17:18:58 +00:00
|
|
|
|
2005-02-01 21:12:53 +00:00
|
|
|
nsresult HandleInlineSpellCheck(PRInt32 action,
|
|
|
|
nsISelection *aSelection,
|
|
|
|
nsIDOMNode *previousSelectedNode,
|
|
|
|
PRInt32 previousSelectedOffset,
|
|
|
|
nsIDOMNode *aStartNode,
|
|
|
|
PRInt32 aStartOffset,
|
|
|
|
nsIDOMNode *aEndNode,
|
|
|
|
PRInt32 aEndOffset);
|
|
|
|
|
2001-04-05 23:48:01 +00:00
|
|
|
public:
|
|
|
|
// Argh! These transaction names are used by PlaceholderTxn and
|
|
|
|
// nsPlaintextEditor. They should be localized to those classes.
|
|
|
|
static nsIAtom *gTypingTxnName;
|
|
|
|
static nsIAtom *gIMETxnName;
|
|
|
|
static nsIAtom *gDeleteTxnName;
|
|
|
|
|
1999-08-09 01:37:50 +00:00
|
|
|
protected:
|
1999-06-03 05:58:20 +00:00
|
|
|
|
2001-12-10 15:23:11 +00:00
|
|
|
PRUint32 mModCount; // number of modifications (for undo/redo stack)
|
2001-01-28 20:13:07 +00:00
|
|
|
PRUint32 mFlags; // behavior flags. See nsPlaintextEditor.h for the flags we use.
|
1999-08-09 01:37:50 +00:00
|
|
|
|
1999-08-25 10:51:55 +00:00
|
|
|
nsWeakPtr mPresShellWeak; // weak reference to the nsIPresShell
|
2000-04-28 06:20:36 +00:00
|
|
|
nsWeakPtr mSelConWeak; // weak reference to the nsISelectionController
|
1999-08-09 01:37:50 +00:00
|
|
|
nsIViewManager *mViewManager;
|
1999-09-02 20:37:19 +00:00
|
|
|
PRInt32 mUpdateCount;
|
2005-02-01 21:12:53 +00:00
|
|
|
nsCOMPtr<nsIInlineSpellChecker> mInlineSpellChecker; // used for real-time spellchecking
|
1999-08-09 01:37:50 +00:00
|
|
|
nsCOMPtr<nsITransactionManager> mTxnMgr;
|
2000-08-26 04:03:50 +00:00
|
|
|
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
|
|
|
|
PRBool mShouldTxnSetSelection; // turn off for conservative selection adjustment by txns
|
2000-01-10 10:13:58 +00:00
|
|
|
nsCOMPtr<nsIDOMElement> mBodyElement; // cached body node
|
2000-08-26 04:03:50 +00:00
|
|
|
PRInt32 mAction; // the current editor action
|
|
|
|
EDirection mDirection; // the current direction of editor action
|
2000-08-14 02:39:37 +00:00
|
|
|
|
1999-08-09 01:37:50 +00:00
|
|
|
// data necessary to build IME transactions
|
2002-12-22 01:51:14 +00:00
|
|
|
PRBool mInIMEMode; // are we inside an IME composition?
|
|
|
|
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
|
2004-09-12 05:00:57 +00:00
|
|
|
PRPackedBool mIsIMEComposing; // is IME in composition state?
|
2002-12-22 01:51:14 +00:00
|
|
|
// This is different from mInIMEMode. see Bug 98434.
|
2004-09-12 05:00:57 +00:00
|
|
|
PRPackedBool mNeedRecoverIMEOpenState; // Need IME open state change on blur.
|
1999-08-09 01:37:50 +00:00
|
|
|
|
2000-08-14 02:39:37 +00:00
|
|
|
// various listeners
|
2000-07-16 06:36:27 +00:00
|
|
|
nsVoidArray* mActionListeners; // listens to all low level actions on the doc
|
|
|
|
nsVoidArray* mEditorObservers; // just notify once per high level change
|
|
|
|
nsCOMPtr<nsISupportsArray> mDocStateListeners;// listen to overall doc state (dirty or not, just created, etc)
|
1999-08-09 01:37:50 +00:00
|
|
|
|
|
|
|
PRInt8 mDocDirtyState; // -1 = not initialized
|
1999-08-25 10:51:55 +00:00
|
|
|
nsWeakPtr mDocWeak; // weak reference to the nsIDOMDocument
|
1999-08-09 01:37:50 +00:00
|
|
|
nsCOMPtr<nsIDTD> mDTD;
|
|
|
|
|
2002-12-17 23:38:04 +00:00
|
|
|
nsString* mPhonetic;
|
|
|
|
|
1999-08-09 01:37:50 +00:00
|
|
|
static PRInt32 gInstanceCount;
|
|
|
|
|
|
|
|
friend PRBool NSCanUnload(nsISupports* serviceMgr);
|
2000-01-04 03:09:41 +00:00
|
|
|
friend class nsAutoTxnsConserveSelection;
|
2000-03-24 00:26:47 +00:00
|
|
|
friend class nsAutoSelectionReset;
|
2000-08-14 02:39:37 +00:00
|
|
|
friend class nsAutoRules;
|
2002-11-10 15:11:08 +00:00
|
|
|
friend class nsRangeUpdater;
|
1999-06-08 06:04:51 +00:00
|
|
|
};
|
|
|
|
|
1999-06-03 05:58:20 +00:00
|
|
|
|
1999-02-18 12:14:59 +00:00
|
|
|
#endif
|