From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- editor/libeditor/EditorForwards.h | 168 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 editor/libeditor/EditorForwards.h (limited to 'editor/libeditor/EditorForwards.h') diff --git a/editor/libeditor/EditorForwards.h b/editor/libeditor/EditorForwards.h new file mode 100644 index 0000000000..80223a6db5 --- /dev/null +++ b/editor/libeditor/EditorForwards.h @@ -0,0 +1,168 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. */ + +#ifndef mozilla_EditorHelperForwards_h +#define mozilla_EditorHelperForwards_h + +#include "mozilla/EnumSet.h" + +#include + +/****************************************************************************** + * Forward declarations of other modules' + ******************************************************************************/ +class nsIContent; +class nsINode; + +template +class nsCOMPtr; + +template +class RefPtr; + +namespace mozilla { + +template +class Result; + +template +class OwningNonNull; + +namespace dom { +class Element; +class Text; +} // namespace dom + +/****************************************************************************** + * enum classes + ******************************************************************************/ + +enum class BlockInlineCheck : uint8_t; // HTMLEditHelpers.h +enum class CollectChildrenOption; // HTMLEditUtils.h +enum class EditAction; // mozilla/EditAction.h +enum class EditorCommandParamType : uint16_t; // mozilla/EditorCommands.h +enum class EditSubAction : int32_t; // mozilla/EditAction.h +enum class ParagraphSeparator; // mozilla/HTMLEditor.h +enum class SpecifiedStyle : uint8_t; // mozilla/PendingStyles.h +enum class SuggestCaret; // EditorUtils.h +enum class WithTransaction; // HTMLEditHelpers.h + +/****************************************************************************** + * enum sets + ******************************************************************************/ + +using CollectChildrenOptions = EnumSet; +using SuggestCaretOptions = EnumSet; + +/****************************************************************************** + * classes or structs which are required for template classes/structs + ******************************************************************************/ + +template +class EditorDOMPointBase; // mozilla/EditorDOMPoint.h + +using EditorDOMPoint = + EditorDOMPointBase, nsCOMPtr>; +using EditorRawDOMPoint = EditorDOMPointBase; +using EditorDOMPointInText = EditorDOMPointBase, nsIContent*>; +using EditorRawDOMPointInText = EditorDOMPointBase; + +/****************************************************************************** + * classes + ******************************************************************************/ + +class AutoPendingStyleCacheArray; // mozilla/PendingStyles.h +class EditTransactionBase; // mozilla/EditTransactionBase.h +class EditorBase; // mozilla/EditorBase.h +class HTMLEditor; // mozilla/HTMLEditor.h +class ManualNACPtr; // mozilla/ManualNAC.h +class PendingStyle; // mozilla/PendingStyles.h +class PendingStyleCache; // mozilla/PendingStyles.h +class PendingStyles; // mozilla/PendingStyles.h +class RangeUpdater; // mozilla/SelectionState.h +class SelectionState; // mozilla/SelectionState.h +class TextEditor; // mozilla/TextEditor.h + +class AutoRangeArray; // AutoRangeArray.h +class AutoSelectionRangeArray; // EditorUtils.h +class CaretPoint; // EditorUtils.h +class ChangeAttributeTransaction; // ChangeAttributeTransaction.h +class ChangeStyleTransaction; // ChangeStyleTransaction.h +class CompositionTransaction; // CompositionTransaction.h +class CSSEditUtils; // CSSEditUtils.h +class DeleteContentTransactionBase; // DeleteContentTransactionBase.h +class DeleteMultipleRangesTransaction; // DeleteMultipleRangesTransaction.h +class DeleteNodeTransaction; // DeleteNodeTransaction.h +class DeleteRangeTransaction; // DeleteRangeTransaction.h +class DeleteTextTransaction; // DeleteTextTransaction.h +class EditActionResult; // EditorUtils.h +class EditAggregateTransaction; // EditAggregateTransaction.h +class EditorEventListener; // EditorEventListener.h +class EditResult; // HTMLEditHelpers.h +class HTMLEditorEventListener; // HTMLEditorEventListener.h +class InsertNodeTransaction; // InsertNodeTransaction.h +class InsertTextResult; // EditorUtils.h +class InsertTextTransaction; // InsertTextTransaction.h +class InterCiter; // InterCiter.h +class JoinNodesResult; // HTMLEditHelpers.h +class JoinNodesTransaction; // JoinNodesTransaction.h +class MoveNodeResult; // HTMLEditHelpers.h +class MoveNodeTransaction; // MoveNodeTransaction.h +class PlaceholderTransaction; // PlaceholderTransaction.h +class ReplaceTextTransaction; // ReplaceTextTransaction.h +class SplitNodeResult; // HTMLEditHelpers.h +class SplitNodeTransaction; // SplitNodeTransaction.h +class SplitRangeOffFromNodeResult; // HTMLEditHelpers.h +class SplitRangeOffResult; // HTMLEditHelpers.h +class WhiteSpaceVisibilityKeeper; // WSRunObject.h +class WSRunScanner; // WSRunObject.h +class WSScanResult; // WSRunObject.h + +/****************************************************************************** + * structs + ******************************************************************************/ + +class EditorElementStyle; // HTMLEditHelpers.h +struct EditorInlineStyle; // HTMLEditHelpers.h +struct EditorInlineStyleAndValue; // HTMLEditHelpers.h +struct RangeItem; // mozilla/SelectionState.h + +/****************************************************************************** + * template classes + ******************************************************************************/ + +template +class EditorDOMRangeBase; // mozilla/EditorDOMPoint.h + +template +class CreateNodeResultBase; // EditorUtils.h + +template +class ReplaceRangeDataBase; // EditorUtils.h + +/****************************************************************************** + * aliases + ******************************************************************************/ + +using CreateContentResult = CreateNodeResultBase; +using CreateElementResult = CreateNodeResultBase; +using CreateTextResult = CreateNodeResultBase; + +// InsertParagraphResult is an alias of CreateElementResult because it returns +// new paragraph from point of view of users (i.e., right paragraph if split) +// instead of newly created paragraph element. +using InsertParagraphResult = CreateElementResult; + +using EditorDOMRange = EditorDOMRangeBase; +using EditorRawDOMRange = EditorDOMRangeBase; +using EditorDOMRangeInTexts = EditorDOMRangeBase; +using EditorRawDOMRangeInTexts = EditorDOMRangeBase; + +using ReplaceRangeData = ReplaceRangeDataBase; +using ReplaceRangeInTextsData = ReplaceRangeDataBase; + +} // namespace mozilla + +#endif // #ifndef mozilla_EditorHelperForwards_h -- cgit v1.2.3