2000-01-26 00:36:18 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape 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/NPL/
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsHTMLEditUtils_h__
|
|
|
|
#define nsHTMLEditUtils_h__
|
|
|
|
|
|
|
|
#include "prtypes.h" // for PRBool
|
|
|
|
#include "nsError.h" // for nsresult
|
2000-05-04 08:33:48 +00:00
|
|
|
class nsIEditor;
|
2000-01-26 00:36:18 +00:00
|
|
|
class nsIDOMNode;
|
|
|
|
|
|
|
|
class nsHTMLEditUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// from nsTextEditRules:
|
2000-02-08 12:53:34 +00:00
|
|
|
static PRBool IsBig(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsSmall(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
|
|
|
|
// from nsHTMLEditRules:
|
|
|
|
static PRBool IsHeader(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsParagraph(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsListItem(nsIDOMNode *aNode);
|
2000-03-21 06:05:24 +00:00
|
|
|
static PRBool IsTable(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsTableRow(nsIDOMNode *aNode);
|
2000-08-13 23:53:34 +00:00
|
|
|
static PRBool IsTableElement(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsTableCell(nsIDOMNode *aNode);
|
2000-08-13 23:53:34 +00:00
|
|
|
static PRBool IsTableCellOrCaption(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsList(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsOrderedList(nsIDOMNode *aNode);
|
fixes:
14753, 29843, 39864, 40141,
40139, 36679, 39542, 34729,
34855, 37216, 39292, 26447
r=sfraser,cmanske,fm; a=beppe
2000-05-24 23:00:24 +00:00
|
|
|
static PRBool IsUnorderedList(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsDefinitionList(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsBlockquote(nsIDOMNode *aNode);
|
2000-02-25 04:39:30 +00:00
|
|
|
static PRBool IsPre(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsAddress(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsAnchor(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsImage(nsIDOMNode *aNode);
|
2001-01-28 20:13:07 +00:00
|
|
|
static PRBool IsLink(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsNamedAnchor(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsDiv(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsNormalDiv(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsMozDiv(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsMailCite(nsIDOMNode *aNode);
|
2001-03-30 14:39:29 +00:00
|
|
|
static PRBool IsTextarea(nsIDOMNode *aNode);
|
|
|
|
static PRBool IsMap(nsIDOMNode *aNode);
|
2000-01-26 00:36:18 +00:00
|
|
|
static PRBool IsDescendantOf(nsIDOMNode *aNode, nsIDOMNode *aParent);
|
2000-08-26 04:03:50 +00:00
|
|
|
|
|
|
|
static PRBool IsLeafNode(nsIDOMNode *aNode);
|
|
|
|
|
2000-01-26 00:36:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsHTMLEditUtils_h__ */
|
|
|
|
|