editor/libeditor/html/nsHTMLEditUtils.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/editor/libeditor/html/nsHTMLEditUtils.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsHTMLEditUtils_h__
    1.10 +#define nsHTMLEditUtils_h__
    1.11 +
    1.12 +
    1.13 +class nsIDOMNode;
    1.14 +class nsINode;
    1.15 +
    1.16 +class nsHTMLEditUtils
    1.17 +{
    1.18 +public:
    1.19 +  // from nsTextEditRules:
    1.20 +  static bool IsBig(nsIDOMNode *aNode);
    1.21 +  static bool IsSmall(nsIDOMNode *aNode);
    1.22 +
    1.23 +  // from nsHTMLEditRules:
    1.24 +  static bool IsInlineStyle(nsINode* aNode);
    1.25 +  static bool IsInlineStyle(nsIDOMNode *aNode);
    1.26 +  static bool IsFormatNode(nsINode* aNode);
    1.27 +  static bool IsFormatNode(nsIDOMNode *aNode);
    1.28 +  static bool IsNodeThatCanOutdent(nsIDOMNode *aNode);
    1.29 +  static bool IsHeader(nsIDOMNode *aNode);
    1.30 +  static bool IsParagraph(nsIDOMNode *aNode);
    1.31 +  static bool IsHR(nsIDOMNode *aNode);
    1.32 +  static bool IsListItem(nsINode* aNode);
    1.33 +  static bool IsListItem(nsIDOMNode *aNode);
    1.34 +  static bool IsTable(nsIDOMNode *aNode);
    1.35 +  static bool IsTableRow(nsIDOMNode *aNode);
    1.36 +  static bool IsTableElement(nsINode* aNode);
    1.37 +  static bool IsTableElement(nsIDOMNode *aNode);
    1.38 +  static bool IsTableElementButNotTable(nsINode* aNode);
    1.39 +  static bool IsTableElementButNotTable(nsIDOMNode *aNode);
    1.40 +  static bool IsTableCell(nsINode* node);
    1.41 +  static bool IsTableCell(nsIDOMNode *aNode);
    1.42 +  static bool IsTableCellOrCaption(nsIDOMNode *aNode);
    1.43 +  static bool IsList(nsINode* aNode);
    1.44 +  static bool IsList(nsIDOMNode *aNode);
    1.45 +  static bool IsOrderedList(nsIDOMNode *aNode);
    1.46 +  static bool IsUnorderedList(nsIDOMNode *aNode);
    1.47 +  static bool IsBlockquote(nsIDOMNode *aNode);
    1.48 +  static bool IsPre(nsIDOMNode *aNode);
    1.49 +  static bool IsAnchor(nsIDOMNode *aNode);
    1.50 +  static bool IsImage(nsIDOMNode *aNode);
    1.51 +  static bool IsLink(nsIDOMNode *aNode);
    1.52 +  static bool IsNamedAnchor(nsINode* aNode);
    1.53 +  static bool IsNamedAnchor(nsIDOMNode *aNode);
    1.54 +  static bool IsDiv(nsIDOMNode *aNode);
    1.55 +  static bool IsMozDiv(nsIDOMNode *aNode);
    1.56 +  static bool IsMailCite(nsINode* aNode);
    1.57 +  static bool IsMailCite(nsIDOMNode *aNode);
    1.58 +  static bool IsFormWidget(nsINode* aNode);
    1.59 +  static bool IsFormWidget(nsIDOMNode *aNode);
    1.60 +  static bool SupportsAlignAttr(nsIDOMNode *aNode);
    1.61 +  static bool CanContain(int32_t aParent, int32_t aChild);
    1.62 +  static bool IsContainer(int32_t aTag);
    1.63 +};
    1.64 +
    1.65 +#endif /* nsHTMLEditUtils_h__ */
    1.66 +

mercurial