Bug 1890689 accumulate input in LargerReceiverBlockSizeThanDesiredBuffering GTest...
[gecko.git] / editor / libeditor / EditorForwards.h
blob80223a6db552c6c6c83bf58695db907da078a526
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/. */
6 #ifndef mozilla_EditorHelperForwards_h
7 #define mozilla_EditorHelperForwards_h
9 #include "mozilla/EnumSet.h"
11 #include <cstdint>
13 /******************************************************************************
14 * Forward declarations of other modules'
15 ******************************************************************************/
16 class nsIContent;
17 class nsINode;
19 template <typename T>
20 class nsCOMPtr;
22 template <typename T>
23 class RefPtr;
25 namespace mozilla {
27 template <typename V, typename E>
28 class Result;
30 template <typename T>
31 class OwningNonNull;
33 namespace dom {
34 class Element;
35 class Text;
36 } // namespace dom
38 /******************************************************************************
39 * enum classes
40 ******************************************************************************/
42 enum class BlockInlineCheck : uint8_t; // HTMLEditHelpers.h
43 enum class CollectChildrenOption; // HTMLEditUtils.h
44 enum class EditAction; // mozilla/EditAction.h
45 enum class EditorCommandParamType : uint16_t; // mozilla/EditorCommands.h
46 enum class EditSubAction : int32_t; // mozilla/EditAction.h
47 enum class ParagraphSeparator; // mozilla/HTMLEditor.h
48 enum class SpecifiedStyle : uint8_t; // mozilla/PendingStyles.h
49 enum class SuggestCaret; // EditorUtils.h
50 enum class WithTransaction; // HTMLEditHelpers.h
52 /******************************************************************************
53 * enum sets
54 ******************************************************************************/
56 using CollectChildrenOptions = EnumSet<CollectChildrenOption>;
57 using SuggestCaretOptions = EnumSet<SuggestCaret>;
59 /******************************************************************************
60 * classes or structs which are required for template classes/structs
61 ******************************************************************************/
63 template <typename PT, typename CT>
64 class EditorDOMPointBase; // mozilla/EditorDOMPoint.h
66 using EditorDOMPoint =
67 EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>>;
68 using EditorRawDOMPoint = EditorDOMPointBase<nsINode*, nsIContent*>;
69 using EditorDOMPointInText = EditorDOMPointBase<RefPtr<dom::Text>, nsIContent*>;
70 using EditorRawDOMPointInText = EditorDOMPointBase<dom::Text*, nsIContent*>;
72 /******************************************************************************
73 * classes
74 ******************************************************************************/
76 class AutoPendingStyleCacheArray; // mozilla/PendingStyles.h
77 class EditTransactionBase; // mozilla/EditTransactionBase.h
78 class EditorBase; // mozilla/EditorBase.h
79 class HTMLEditor; // mozilla/HTMLEditor.h
80 class ManualNACPtr; // mozilla/ManualNAC.h
81 class PendingStyle; // mozilla/PendingStyles.h
82 class PendingStyleCache; // mozilla/PendingStyles.h
83 class PendingStyles; // mozilla/PendingStyles.h
84 class RangeUpdater; // mozilla/SelectionState.h
85 class SelectionState; // mozilla/SelectionState.h
86 class TextEditor; // mozilla/TextEditor.h
88 class AutoRangeArray; // AutoRangeArray.h
89 class AutoSelectionRangeArray; // EditorUtils.h
90 class CaretPoint; // EditorUtils.h
91 class ChangeAttributeTransaction; // ChangeAttributeTransaction.h
92 class ChangeStyleTransaction; // ChangeStyleTransaction.h
93 class CompositionTransaction; // CompositionTransaction.h
94 class CSSEditUtils; // CSSEditUtils.h
95 class DeleteContentTransactionBase; // DeleteContentTransactionBase.h
96 class DeleteMultipleRangesTransaction; // DeleteMultipleRangesTransaction.h
97 class DeleteNodeTransaction; // DeleteNodeTransaction.h
98 class DeleteRangeTransaction; // DeleteRangeTransaction.h
99 class DeleteTextTransaction; // DeleteTextTransaction.h
100 class EditActionResult; // EditorUtils.h
101 class EditAggregateTransaction; // EditAggregateTransaction.h
102 class EditorEventListener; // EditorEventListener.h
103 class EditResult; // HTMLEditHelpers.h
104 class HTMLEditorEventListener; // HTMLEditorEventListener.h
105 class InsertNodeTransaction; // InsertNodeTransaction.h
106 class InsertTextResult; // EditorUtils.h
107 class InsertTextTransaction; // InsertTextTransaction.h
108 class InterCiter; // InterCiter.h
109 class JoinNodesResult; // HTMLEditHelpers.h
110 class JoinNodesTransaction; // JoinNodesTransaction.h
111 class MoveNodeResult; // HTMLEditHelpers.h
112 class MoveNodeTransaction; // MoveNodeTransaction.h
113 class PlaceholderTransaction; // PlaceholderTransaction.h
114 class ReplaceTextTransaction; // ReplaceTextTransaction.h
115 class SplitNodeResult; // HTMLEditHelpers.h
116 class SplitNodeTransaction; // SplitNodeTransaction.h
117 class SplitRangeOffFromNodeResult; // HTMLEditHelpers.h
118 class SplitRangeOffResult; // HTMLEditHelpers.h
119 class WhiteSpaceVisibilityKeeper; // WSRunObject.h
120 class WSRunScanner; // WSRunObject.h
121 class WSScanResult; // WSRunObject.h
123 /******************************************************************************
124 * structs
125 ******************************************************************************/
127 class EditorElementStyle; // HTMLEditHelpers.h
128 struct EditorInlineStyle; // HTMLEditHelpers.h
129 struct EditorInlineStyleAndValue; // HTMLEditHelpers.h
130 struct RangeItem; // mozilla/SelectionState.h
132 /******************************************************************************
133 * template classes
134 ******************************************************************************/
136 template <typename EditorDOMPointType>
137 class EditorDOMRangeBase; // mozilla/EditorDOMPoint.h
139 template <typename NodeType>
140 class CreateNodeResultBase; // EditorUtils.h
142 template <typename EditorDOMPointType>
143 class ReplaceRangeDataBase; // EditorUtils.h
145 /******************************************************************************
146 * aliases
147 ******************************************************************************/
149 using CreateContentResult = CreateNodeResultBase<nsIContent>;
150 using CreateElementResult = CreateNodeResultBase<dom::Element>;
151 using CreateTextResult = CreateNodeResultBase<dom::Text>;
153 // InsertParagraphResult is an alias of CreateElementResult because it returns
154 // new paragraph from point of view of users (i.e., right paragraph if split)
155 // instead of newly created paragraph element.
156 using InsertParagraphResult = CreateElementResult;
158 using EditorDOMRange = EditorDOMRangeBase<EditorDOMPoint>;
159 using EditorRawDOMRange = EditorDOMRangeBase<EditorRawDOMPoint>;
160 using EditorDOMRangeInTexts = EditorDOMRangeBase<EditorDOMPointInText>;
161 using EditorRawDOMRangeInTexts = EditorDOMRangeBase<EditorRawDOMPointInText>;
163 using ReplaceRangeData = ReplaceRangeDataBase<EditorDOMPoint>;
164 using ReplaceRangeInTextsData = ReplaceRangeDataBase<EditorDOMPointInText>;
166 } // namespace mozilla
168 #endif // #ifndef mozilla_EditorHelperForwards_h