diff --git a/editor/libeditor/DeleteNodeTransaction.cpp b/editor/libeditor/DeleteNodeTransaction.cpp index d3659e08d34a..180fbdca4793 100644 --- a/editor/libeditor/DeleteNodeTransaction.cpp +++ b/editor/libeditor/DeleteNodeTransaction.cpp @@ -8,6 +8,7 @@ #include "HTMLEditUtils.h" #include "mozilla/EditorBase.h" #include "mozilla/SelectionState.h" // RangeUpdater +#include "mozilla/TextEditor.h" #include "nsDebug.h" #include "nsError.h" #include "nsAString.h" diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index 438880e545c8..95d7c08bc52c 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -38,6 +38,7 @@ #include "mozilla/EditorUtils.h" // for various helper classes. #include "mozilla/EditTransactionBase.h" // for EditTransactionBase #include "mozilla/FlushType.h" // for FlushType::Frames +#include "mozilla/HTMLEditor.h" // for HTMLEditor #include "mozilla/IMEContentObserver.h" // for IMEContentObserver #include "mozilla/IMEStateManager.h" // for IMEStateManager #include "mozilla/InputEventOptions.h" // for InputEventOptions @@ -57,6 +58,7 @@ #include "mozilla/TextComposition.h" // for TextComposition #include "mozilla/TextInputListener.h" // for TextInputListener #include "mozilla/TextServicesDocument.h" // for TextServicesDocument +#include "mozilla/TextEditor.h" #include "mozilla/TextEvents.h" #include "mozilla/TransactionManager.h" // for TransactionManager #include "mozilla/Tuple.h" diff --git a/editor/libeditor/EditorCommands.cpp b/editor/libeditor/EditorCommands.cpp index 3f44dbb3c3ce..4398039338f9 100644 --- a/editor/libeditor/EditorCommands.cpp +++ b/editor/libeditor/EditorCommands.cpp @@ -8,6 +8,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/FlushType.h" +#include "mozilla/HTMLEditor.h" #include "mozilla/Maybe.h" #include "mozilla/MozPromise.h" // for mozilla::detail::Any #include "mozilla/TextEditor.h" @@ -732,7 +733,7 @@ static const struct PhysicalCommand { nsresult SelectionMoveCommands::DoCommand(Command aCommand, TextEditor& aTextEditor, nsIPrincipal* aPrincipal) const { - RefPtr document = aTextEditor.GetDocument(); + RefPtr document = aTextEditor.GetDocument(); if (document) { // Most of the commands below (possibly all of them) need layout to // be up to date. diff --git a/editor/libeditor/EditorCommands.h b/editor/libeditor/EditorCommands.h index 588344d93ec8..1e63609f92c9 100644 --- a/editor/libeditor/EditorCommands.h +++ b/editor/libeditor/EditorCommands.h @@ -6,9 +6,11 @@ #ifndef mozilla_EditorCommands_h #define mozilla_EditorCommands_h +#include "mozilla/EventForwards.h" #include "mozilla/Maybe.h" #include "mozilla/StaticPtr.h" #include "mozilla/TypedEnumBits.h" +#include "nsGkAtoms.h" #include "nsIControllerCommand.h" #include "nsIPrincipal.h" #include "nsISupportsImpl.h" diff --git a/editor/libeditor/EditorEventListener.cpp b/editor/libeditor/EditorEventListener.cpp index 1a72505935a6..f6b5aa8ae63c 100644 --- a/editor/libeditor/EditorEventListener.cpp +++ b/editor/libeditor/EditorEventListener.cpp @@ -12,6 +12,7 @@ #include "mozilla/EditorBase.h" // for EditorBase, etc. #include "mozilla/EventListenerManager.h" // for EventListenerManager #include "mozilla/EventStateManager.h" // for EventStateManager +#include "mozilla/HTMLEditor.h" // for HTMLEditor #include "mozilla/IMEStateManager.h" // for IMEStateManager #include "mozilla/Preferences.h" // for Preferences #include "mozilla/PresShell.h" // for PresShell diff --git a/editor/libeditor/EditorEventListener.h b/editor/libeditor/EditorEventListener.h index f458d0a3965a..2cea3c6b8d4b 100644 --- a/editor/libeditor/EditorEventListener.h +++ b/editor/libeditor/EditorEventListener.h @@ -81,9 +81,9 @@ class EditorEventListener : public nsIDOMEventListener { MOZ_CAN_RUN_SCRIPT nsresult DragOverOrDrop(dom::DragEvent* aDragEvent); nsresult DragExit(dom::DragEvent* aDragEvent); - void RefuseToDropAndHideCaret(DragEvent* aDragEvent); - bool DragEventHasSupportingData(DragEvent* aDragEvent) const; - MOZ_CAN_RUN_SCRIPT bool CanInsertAtDropPosition(DragEvent* aDragEvent); + void RefuseToDropAndHideCaret(dom::DragEvent* aDragEvent); + bool DragEventHasSupportingData(dom::DragEvent* aDragEvent) const; + MOZ_CAN_RUN_SCRIPT bool CanInsertAtDropPosition(dom::DragEvent* aDragEvent); void CleanupDragDropCaret(); PresShell* GetPresShell() const; nsPresContext* GetPresContext() const; diff --git a/editor/libeditor/HTMLEditUtils.cpp b/editor/libeditor/HTMLEditUtils.cpp index d0999d72587d..5c20266eff3d 100644 --- a/editor/libeditor/HTMLEditUtils.cpp +++ b/editor/libeditor/HTMLEditUtils.cpp @@ -226,8 +226,8 @@ bool HTMLEditUtils::IsLink(nsINode* aNode) { return false; } - RefPtr anchor = - HTMLAnchorElement::FromNodeOrNull(aNode->AsContent()); + RefPtr anchor = + dom::HTMLAnchorElement::FromNodeOrNull(aNode->AsContent()); if (!anchor) { return false; } diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp index c3a1d14f9fb9..2bc4207ca0a2 100644 --- a/editor/libeditor/HTMLEditor.cpp +++ b/editor/libeditor/HTMLEditor.cpp @@ -57,6 +57,7 @@ #include "mozilla/dom/Element.h" #include "mozilla/dom/Event.h" #include "mozilla/dom/EventTarget.h" +#include "mozilla/dom/HTMLAnchorElement.h" #include "mozilla/dom/HTMLBodyElement.h" #include "nsElementTable.h" #include "nsTextFragment.h" diff --git a/editor/libeditor/HTMLEditorDataTransfer.cpp b/editor/libeditor/HTMLEditorDataTransfer.cpp index 9e98716038c3..67434b0dfc8b 100644 --- a/editor/libeditor/HTMLEditorDataTransfer.cpp +++ b/editor/libeditor/HTMLEditorDataTransfer.cpp @@ -16,6 +16,8 @@ #include "mozilla/dom/DocumentFragment.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/DOMStringList.h" +#include "mozilla/dom/DOMStringList.h" +#include "mozilla/dom/Event.h" #include "mozilla/dom/FileReader.h" #include "mozilla/dom/Selection.h" #include "mozilla/dom/WorkerRef.h" diff --git a/editor/libeditor/HTMLEditorDocumentCommands.cpp b/editor/libeditor/HTMLEditorDocumentCommands.cpp index eaef2e0733f9..dc665d66e227 100644 --- a/editor/libeditor/HTMLEditorDocumentCommands.cpp +++ b/editor/libeditor/HTMLEditorDocumentCommands.cpp @@ -393,7 +393,7 @@ nsresult DocumentStateCommand::GetCommandStateParams( if (!aTextEditor) { return NS_OK; } - Document* document = aTextEditor->GetDocument(); + dom::Document* document = aTextEditor->GetDocument(); if (NS_WARN_IF(!document)) { return NS_ERROR_FAILURE; } diff --git a/editor/libeditor/HTMLEditorObjectResizer.cpp b/editor/libeditor/HTMLEditorObjectResizer.cpp index a58ef16fefc4..b6ee265ed0b4 100644 --- a/editor/libeditor/HTMLEditorObjectResizer.cpp +++ b/editor/libeditor/HTMLEditorObjectResizer.cpp @@ -31,6 +31,7 @@ #include "nsReadableUtils.h" #include "nsString.h" #include "nsStringFwd.h" +#include "nsTextNode.h" #include "nscore.h" #include diff --git a/editor/libeditor/HTMLInlineTableEditor.cpp b/editor/libeditor/HTMLInlineTableEditor.cpp index 7496d6287849..c9e66458873b 100644 --- a/editor/libeditor/HTMLInlineTableEditor.cpp +++ b/editor/libeditor/HTMLInlineTableEditor.cpp @@ -4,6 +4,7 @@ #include "mozilla/HTMLEditor.h" +#include "EditorEventListener.h" #include "HTMLEditUtils.h" #include "mozilla/PresShell.h" #include "mozilla/dom/Element.h" diff --git a/editor/libeditor/InsertNodeTransaction.cpp b/editor/libeditor/InsertNodeTransaction.cpp index 3520b1a21c45..16a06811ca1a 100644 --- a/editor/libeditor/InsertNodeTransaction.cpp +++ b/editor/libeditor/InsertNodeTransaction.cpp @@ -7,6 +7,8 @@ #include "mozilla/EditorBase.h" // for EditorBase #include "mozilla/EditorDOMPoint.h" // for EditorDOMPoint +#include "mozilla/HTMLEditor.h" // for HTMLEditor +#include "mozilla/TextEditor.h" // for TextEditor #include "mozilla/dom/Selection.h" // for Selection diff --git a/editor/libeditor/PlaceholderTransaction.h b/editor/libeditor/PlaceholderTransaction.h index 79e58af1dc49..6ad9e9551e2c 100644 --- a/editor/libeditor/PlaceholderTransaction.h +++ b/editor/libeditor/PlaceholderTransaction.h @@ -8,10 +8,13 @@ #include "EditAggregateTransaction.h" #include "mozilla/Maybe.h" +#include "mozilla/SelectionState.h" #include "mozilla/WeakPtr.h" namespace mozilla { +class EditorBase; + /** * An aggregate transaction that knows how to absorb all subsequent * transactions with the same name. This transaction does not "Do" anything. diff --git a/editor/libeditor/TextEditSubActionHandler.cpp b/editor/libeditor/TextEditSubActionHandler.cpp index 44c365bd550d..18631860b50b 100644 --- a/editor/libeditor/TextEditSubActionHandler.cpp +++ b/editor/libeditor/TextEditSubActionHandler.cpp @@ -9,6 +9,7 @@ #include "mozilla/EditAction.h" #include "mozilla/EditorDOMPoint.h" #include "mozilla/EditorUtils.h" +#include "mozilla/HTMLEditor.h" #include "mozilla/LookAndFeel.h" #include "mozilla/Preferences.h" #include "mozilla/StaticPrefs_editor.h" diff --git a/editor/libeditor/TextEditor.cpp b/editor/libeditor/TextEditor.cpp index 02773e7e790c..5859e284d292 100644 --- a/editor/libeditor/TextEditor.cpp +++ b/editor/libeditor/TextEditor.cpp @@ -9,6 +9,7 @@ #include "EditAggregateTransaction.h" #include "InternetCiter.h" +#include "PlaceholderTransaction.h" #include "gfxFontUtils.h" #include "mozilla/Assertions.h" #include "mozilla/ContentIterator.h" diff --git a/editor/libeditor/TextEditorDataTransfer.cpp b/editor/libeditor/TextEditorDataTransfer.cpp index a4013b793479..506feafbc439 100644 --- a/editor/libeditor/TextEditorDataTransfer.cpp +++ b/editor/libeditor/TextEditorDataTransfer.cpp @@ -6,10 +6,12 @@ #include "mozilla/TextEditor.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/HTMLEditor.h" #include "mozilla/MouseEvents.h" #include "mozilla/SelectionState.h" #include "mozilla/TextControlElement.h" #include "mozilla/dom/DataTransfer.h" +#include "mozilla/dom/DocumentInlines.h" #include "mozilla/dom/DragEvent.h" #include "mozilla/dom/Selection.h" #include "mozilla/dom/StaticRange.h" diff --git a/editor/libeditor/WSRunObject.h b/editor/libeditor/WSRunObject.h index 9f51f505fd82..298cb0373dc1 100644 --- a/editor/libeditor/WSRunObject.h +++ b/editor/libeditor/WSRunObject.h @@ -409,7 +409,7 @@ class MOZ_STACK_CLASS WSRunScanner { /** * Active editing host when this instance is created. */ - Element* GetEditingHost() const { return mEditingHost; } + dom::Element* GetEditingHost() const { return mEditingHost; } protected: using EditorType = EditorBase::EditorType; @@ -614,7 +614,7 @@ class MOZ_STACK_CLASS WSRunScanner { // info. // The editing host when the instance is created. - RefPtr mEditingHost; + RefPtr mEditingHost; // true if we are in preformatted whitespace context. bool mPRE; @@ -762,7 +762,7 @@ class MOZ_STACK_CLASS WSRunObject final : public WSRunScanner { * node, returns nullptr. */ MOZ_CAN_RUN_SCRIPT already_AddRefed InsertBreak( - Selection& aSelection, const EditorDOMPoint& aPointToInsert, + dom::Selection& aSelection, const EditorDOMPoint& aPointToInsert, nsIEditor::EDirection aSelect); /** diff --git a/editor/spellchecker/TextServicesDocument.cpp b/editor/spellchecker/TextServicesDocument.cpp index 826479b539f4..1c2530dc75f3 100644 --- a/editor/spellchecker/TextServicesDocument.cpp +++ b/editor/spellchecker/TextServicesDocument.cpp @@ -23,6 +23,7 @@ #include "nsIContent.h" // for nsIContent, etc #include "nsID.h" // for NS_GET_IID #include "nsIEditor.h" // for nsIEditor, etc +#include "nsIEditorSpellCheck.h" // for nsIEditorSpellCheck, etc #include "nsINode.h" // for nsINode #include "nsISelectionController.h" // for nsISelectionController, etc #include "nsISupportsBase.h" // for nsISupports diff --git a/editor/spellchecker/nsComposeTxtSrvFilter.h b/editor/spellchecker/nsComposeTxtSrvFilter.h index 6970f50e035e..b2de83451b76 100644 --- a/editor/spellchecker/nsComposeTxtSrvFilter.h +++ b/editor/spellchecker/nsComposeTxtSrvFilter.h @@ -8,6 +8,8 @@ #include "mozilla/UniquePtr.h" +class nsINode; + /** * This class enables those using it to skip over certain nodes when * traversing content. diff --git a/editor/txmgr/TransactionStack.h b/editor/txmgr/TransactionStack.h index a5b27014ab4c..0e94dc59eaf6 100644 --- a/editor/txmgr/TransactionStack.h +++ b/editor/txmgr/TransactionStack.h @@ -6,6 +6,7 @@ #ifndef mozilla_TransactionStack_h #define mozilla_TransactionStack_h +#include "mozilla/AlreadyAddRefed.h" #include "nsDeque.h" class nsCycleCollectionTraversalCallback;