michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsHTMLEditUtils_h__ michael@0: #define nsHTMLEditUtils_h__ michael@0: michael@0: michael@0: class nsIDOMNode; michael@0: class nsINode; michael@0: michael@0: class nsHTMLEditUtils michael@0: { michael@0: public: michael@0: // from nsTextEditRules: michael@0: static bool IsBig(nsIDOMNode *aNode); michael@0: static bool IsSmall(nsIDOMNode *aNode); michael@0: michael@0: // from nsHTMLEditRules: michael@0: static bool IsInlineStyle(nsINode* aNode); michael@0: static bool IsInlineStyle(nsIDOMNode *aNode); michael@0: static bool IsFormatNode(nsINode* aNode); michael@0: static bool IsFormatNode(nsIDOMNode *aNode); michael@0: static bool IsNodeThatCanOutdent(nsIDOMNode *aNode); michael@0: static bool IsHeader(nsIDOMNode *aNode); michael@0: static bool IsParagraph(nsIDOMNode *aNode); michael@0: static bool IsHR(nsIDOMNode *aNode); michael@0: static bool IsListItem(nsINode* aNode); michael@0: static bool IsListItem(nsIDOMNode *aNode); michael@0: static bool IsTable(nsIDOMNode *aNode); michael@0: static bool IsTableRow(nsIDOMNode *aNode); michael@0: static bool IsTableElement(nsINode* aNode); michael@0: static bool IsTableElement(nsIDOMNode *aNode); michael@0: static bool IsTableElementButNotTable(nsINode* aNode); michael@0: static bool IsTableElementButNotTable(nsIDOMNode *aNode); michael@0: static bool IsTableCell(nsINode* node); michael@0: static bool IsTableCell(nsIDOMNode *aNode); michael@0: static bool IsTableCellOrCaption(nsIDOMNode *aNode); michael@0: static bool IsList(nsINode* aNode); michael@0: static bool IsList(nsIDOMNode *aNode); michael@0: static bool IsOrderedList(nsIDOMNode *aNode); michael@0: static bool IsUnorderedList(nsIDOMNode *aNode); michael@0: static bool IsBlockquote(nsIDOMNode *aNode); michael@0: static bool IsPre(nsIDOMNode *aNode); michael@0: static bool IsAnchor(nsIDOMNode *aNode); michael@0: static bool IsImage(nsIDOMNode *aNode); michael@0: static bool IsLink(nsIDOMNode *aNode); michael@0: static bool IsNamedAnchor(nsINode* aNode); michael@0: static bool IsNamedAnchor(nsIDOMNode *aNode); michael@0: static bool IsDiv(nsIDOMNode *aNode); michael@0: static bool IsMozDiv(nsIDOMNode *aNode); michael@0: static bool IsMailCite(nsINode* aNode); michael@0: static bool IsMailCite(nsIDOMNode *aNode); michael@0: static bool IsFormWidget(nsINode* aNode); michael@0: static bool IsFormWidget(nsIDOMNode *aNode); michael@0: static bool SupportsAlignAttr(nsIDOMNode *aNode); michael@0: static bool CanContain(int32_t aParent, int32_t aChild); michael@0: static bool IsContainer(int32_t aTag); michael@0: }; michael@0: michael@0: #endif /* nsHTMLEditUtils_h__ */ michael@0: