|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef nsHTMLEditUtils_h__ |
|
7 #define nsHTMLEditUtils_h__ |
|
8 |
|
9 |
|
10 class nsIDOMNode; |
|
11 class nsINode; |
|
12 |
|
13 class nsHTMLEditUtils |
|
14 { |
|
15 public: |
|
16 // from nsTextEditRules: |
|
17 static bool IsBig(nsIDOMNode *aNode); |
|
18 static bool IsSmall(nsIDOMNode *aNode); |
|
19 |
|
20 // from nsHTMLEditRules: |
|
21 static bool IsInlineStyle(nsINode* aNode); |
|
22 static bool IsInlineStyle(nsIDOMNode *aNode); |
|
23 static bool IsFormatNode(nsINode* aNode); |
|
24 static bool IsFormatNode(nsIDOMNode *aNode); |
|
25 static bool IsNodeThatCanOutdent(nsIDOMNode *aNode); |
|
26 static bool IsHeader(nsIDOMNode *aNode); |
|
27 static bool IsParagraph(nsIDOMNode *aNode); |
|
28 static bool IsHR(nsIDOMNode *aNode); |
|
29 static bool IsListItem(nsINode* aNode); |
|
30 static bool IsListItem(nsIDOMNode *aNode); |
|
31 static bool IsTable(nsIDOMNode *aNode); |
|
32 static bool IsTableRow(nsIDOMNode *aNode); |
|
33 static bool IsTableElement(nsINode* aNode); |
|
34 static bool IsTableElement(nsIDOMNode *aNode); |
|
35 static bool IsTableElementButNotTable(nsINode* aNode); |
|
36 static bool IsTableElementButNotTable(nsIDOMNode *aNode); |
|
37 static bool IsTableCell(nsINode* node); |
|
38 static bool IsTableCell(nsIDOMNode *aNode); |
|
39 static bool IsTableCellOrCaption(nsIDOMNode *aNode); |
|
40 static bool IsList(nsINode* aNode); |
|
41 static bool IsList(nsIDOMNode *aNode); |
|
42 static bool IsOrderedList(nsIDOMNode *aNode); |
|
43 static bool IsUnorderedList(nsIDOMNode *aNode); |
|
44 static bool IsBlockquote(nsIDOMNode *aNode); |
|
45 static bool IsPre(nsIDOMNode *aNode); |
|
46 static bool IsAnchor(nsIDOMNode *aNode); |
|
47 static bool IsImage(nsIDOMNode *aNode); |
|
48 static bool IsLink(nsIDOMNode *aNode); |
|
49 static bool IsNamedAnchor(nsINode* aNode); |
|
50 static bool IsNamedAnchor(nsIDOMNode *aNode); |
|
51 static bool IsDiv(nsIDOMNode *aNode); |
|
52 static bool IsMozDiv(nsIDOMNode *aNode); |
|
53 static bool IsMailCite(nsINode* aNode); |
|
54 static bool IsMailCite(nsIDOMNode *aNode); |
|
55 static bool IsFormWidget(nsINode* aNode); |
|
56 static bool IsFormWidget(nsIDOMNode *aNode); |
|
57 static bool SupportsAlignAttr(nsIDOMNode *aNode); |
|
58 static bool CanContain(int32_t aParent, int32_t aChild); |
|
59 static bool IsContainer(int32_t aTag); |
|
60 }; |
|
61 |
|
62 #endif /* nsHTMLEditUtils_h__ */ |
|
63 |