2001-09-26 02:53:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
2000-01-26 03:36:18 +03:00
|
|
|
|
|
|
|
#ifndef nsHTMLEditUtils_h__
|
|
|
|
#define nsHTMLEditUtils_h__
|
|
|
|
|
2014-12-02 08:06:55 +03:00
|
|
|
#include <stdint.h>
|
2011-12-12 00:03:49 +04:00
|
|
|
|
2000-01-26 03:36:18 +03:00
|
|
|
class nsIDOMNode;
|
2012-07-27 18:03:28 +04:00
|
|
|
class nsINode;
|
2000-01-26 03:36:18 +03:00
|
|
|
|
|
|
|
class nsHTMLEditUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// from nsHTMLEditRules:
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsInlineStyle(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsInlineStyle(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsFormatNode(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsFormatNode(nsIDOMNode *aNode);
|
|
|
|
static bool IsNodeThatCanOutdent(nsIDOMNode *aNode);
|
2014-11-02 15:04:14 +03:00
|
|
|
static bool IsHeader(nsINode& aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsHeader(nsIDOMNode *aNode);
|
|
|
|
static bool IsParagraph(nsIDOMNode *aNode);
|
|
|
|
static bool IsHR(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsListItem(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsListItem(nsIDOMNode *aNode);
|
|
|
|
static bool IsTable(nsIDOMNode *aNode);
|
2014-04-28 15:54:46 +04:00
|
|
|
static bool IsTable(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsTableRow(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsTableElement(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsTableElement(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsTableElementButNotTable(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsTableElementButNotTable(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsTableCell(nsINode* node);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsTableCell(nsIDOMNode *aNode);
|
|
|
|
static bool IsTableCellOrCaption(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsList(nsINode* aNode);
|
2011-09-29 10:19:26 +04: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);
|
2014-11-02 15:04:13 +03:00
|
|
|
static bool IsImage(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsImage(nsIDOMNode *aNode);
|
|
|
|
static bool IsLink(nsIDOMNode *aNode);
|
2014-04-28 15:54:46 +04:00
|
|
|
static bool IsLink(nsINode* aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsNamedAnchor(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsNamedAnchor(nsIDOMNode *aNode);
|
|
|
|
static bool IsDiv(nsIDOMNode *aNode);
|
2014-08-20 16:25:16 +04:00
|
|
|
static bool IsMozDiv(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsMozDiv(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsMailCite(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsMailCite(nsIDOMNode *aNode);
|
2012-07-27 18:03:28 +04:00
|
|
|
static bool IsFormWidget(nsINode* aNode);
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsFormWidget(nsIDOMNode *aNode);
|
|
|
|
static bool SupportsAlignAttr(nsIDOMNode *aNode);
|
2012-08-22 19:56:38 +04:00
|
|
|
static bool CanContain(int32_t aParent, int32_t aChild);
|
|
|
|
static bool IsContainer(int32_t aTag);
|
2000-01-26 03:36:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsHTMLEditUtils_h__ */
|
|
|
|
|