2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsHTMLEditUtils_h__
|
|
|
|
#define nsHTMLEditUtils_h__
|
|
|
|
|
2011-12-11 12:03:49 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
class nsIDOMNode;
|
2012-07-27 07:03:28 -07:00
|
|
|
class nsINode;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsHTMLEditUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// from nsTextEditRules:
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsBig(nsIDOMNode *aNode);
|
|
|
|
static bool IsSmall(nsIDOMNode *aNode);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// from nsHTMLEditRules:
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsInlineStyle(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsInlineStyle(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsFormatNode(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsFormatNode(nsIDOMNode *aNode);
|
|
|
|
static bool IsNodeThatCanOutdent(nsIDOMNode *aNode);
|
|
|
|
static bool IsHeader(nsIDOMNode *aNode);
|
|
|
|
static bool IsParagraph(nsIDOMNode *aNode);
|
|
|
|
static bool IsHR(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsListItem(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsListItem(nsIDOMNode *aNode);
|
|
|
|
static bool IsTable(nsIDOMNode *aNode);
|
|
|
|
static bool IsTableRow(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsTableElement(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsTableElement(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsTableElementButNotTable(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsTableElementButNotTable(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsTableCell(nsINode* node);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsTableCell(nsIDOMNode *aNode);
|
|
|
|
static bool IsTableCellOrCaption(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsList(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsList(nsIDOMNode *aNode);
|
|
|
|
static bool IsOrderedList(nsIDOMNode *aNode);
|
|
|
|
static bool IsUnorderedList(nsIDOMNode *aNode);
|
|
|
|
static bool IsBlockquote(nsIDOMNode *aNode);
|
|
|
|
static bool IsPre(nsIDOMNode *aNode);
|
|
|
|
static bool IsAnchor(nsIDOMNode *aNode);
|
|
|
|
static bool IsImage(nsIDOMNode *aNode);
|
|
|
|
static bool IsLink(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsNamedAnchor(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsNamedAnchor(nsIDOMNode *aNode);
|
|
|
|
static bool IsDiv(nsIDOMNode *aNode);
|
|
|
|
static bool IsMozDiv(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsMailCite(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsMailCite(nsIDOMNode *aNode);
|
2012-07-27 07:03:28 -07:00
|
|
|
static bool IsFormWidget(nsINode* aNode);
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsFormWidget(nsIDOMNode *aNode);
|
|
|
|
static bool SupportsAlignAttr(nsIDOMNode *aNode);
|
2012-08-22 08:56:38 -07:00
|
|
|
static bool CanContain(int32_t aParent, int32_t aChild);
|
|
|
|
static bool IsContainer(int32_t aTag);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsHTMLEditUtils_h__ */
|
|
|
|
|