Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato
authorBotond Ballo <botond@mozilla.com>
Mon, 27 Apr 2020 03:36:57 +0000
changeset 526156 f1c0352bceab21036ec4dc693b5a444a7a86235b
parent 526155 f6310e0f0afd02620052cee407204ad0d80b2bb0
child 526157 1e06eab47c7a65d6ff0a8671a8f678c8c53ba40c
push id37353
push usershindli@mozilla.com
push dateMon, 27 Apr 2020 21:46:18 +0000
treeherdermozilla-central@2b0e2483e2ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1633014
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D72470
editor/libeditor/DeleteNodeTransaction.cpp
editor/libeditor/EditorBase.cpp
editor/libeditor/EditorCommands.cpp
editor/libeditor/EditorCommands.h
editor/libeditor/EditorEventListener.cpp
editor/libeditor/EditorEventListener.h
editor/libeditor/HTMLEditUtils.cpp
editor/libeditor/HTMLEditor.cpp
editor/libeditor/HTMLEditorDataTransfer.cpp
editor/libeditor/HTMLEditorDocumentCommands.cpp
editor/libeditor/HTMLEditorObjectResizer.cpp
editor/libeditor/HTMLInlineTableEditor.cpp
editor/libeditor/InsertNodeTransaction.cpp
editor/libeditor/PlaceholderTransaction.h
editor/libeditor/TextEditSubActionHandler.cpp
editor/libeditor/TextEditor.cpp
editor/libeditor/TextEditorDataTransfer.cpp
editor/libeditor/WSRunObject.h
editor/spellchecker/TextServicesDocument.cpp
editor/spellchecker/nsComposeTxtSrvFilter.h
editor/txmgr/TransactionStack.h
--- a/editor/libeditor/DeleteNodeTransaction.cpp
+++ b/editor/libeditor/DeleteNodeTransaction.cpp
@@ -3,16 +3,17 @@
  * 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/. */
 
 #include "DeleteNodeTransaction.h"
 
 #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"
 
 namespace mozilla {
 
 // static
 already_AddRefed<DeleteNodeTransaction> DeleteNodeTransaction::MaybeCreate(
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -33,16 +33,17 @@
 #include "mozilla/ComputedStyle.h"            // for ComputedStyle
 #include "mozilla/CSSEditUtils.h"             // for CSSEditUtils
 #include "mozilla/EditAction.h"               // for EditSubAction
 #include "mozilla/EditorDOMPoint.h"           // for EditorDOMPoint
 #include "mozilla/EditorSpellCheck.h"         // for EditorSpellCheck
 #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
 #include "mozilla/InternalMutationEvent.h"  // for NS_EVENT_BITS_MUTATION_CHARACTERDATAMODIFIED
 #include "mozilla/mozalloc.h"               // for operator new, etc.
 #include "mozilla/mozInlineSpellChecker.h"  // for mozInlineSpellChecker
 #include "mozilla/mozSpellChecker.h"        // for mozSpellChecker
 #include "mozilla/Preferences.h"            // for Preferences
@@ -52,16 +53,17 @@
 #include "mozilla/ServoCSSParser.h"      // for ServoCSSParser
 #include "mozilla/StaticPrefs_bidi.h"    // for StaticPrefs::bidi_*
 #include "mozilla/StaticPrefs_dom.h"     // for StaticPrefs::dom_*
 #include "mozilla/StaticPrefs_editor.h"  // for StaticPrefs::editor_*
 #include "mozilla/StaticPrefs_layout.h"  // for StaticPrefs::layout_*
 #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"
 #include "mozilla/dom/AbstractRange.h"  // for AbstractRange
 #include "mozilla/dom/CharacterData.h"  // for CharacterData
 #include "mozilla/dom/DataTransfer.h"   // for DataTransfer
 #include "mozilla/dom/Element.h"        // for Element, nsINode::AsElement
 #include "mozilla/dom/EventTarget.h"    // for EventTarget
--- a/editor/libeditor/EditorCommands.cpp
+++ b/editor/libeditor/EditorCommands.cpp
@@ -3,16 +3,17 @@
  * 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/. */
 
 #include "EditorCommands.h"
 
 #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"
 #include "mozilla/dom/Document.h"
 #include "mozilla/dom/Selection.h"
 #include "nsCommandParams.h"
 #include "nsIClipboard.h"
 #include "nsIEditingSession.h"
@@ -727,17 +728,17 @@ static const struct PhysicalCommand {
      nsISelectionController::MOVE_RIGHT, 1},
     {Command::MoveUp2, Command::SelectUp2, nsISelectionController::MOVE_UP, 1},
     {Command::MoveDown2, Command::SelectDown2,
      nsISelectionController::MOVE_DOWN, 1}};
 
 nsresult SelectionMoveCommands::DoCommand(Command aCommand,
                                           TextEditor& aTextEditor,
                                           nsIPrincipal* aPrincipal) const {
-  RefPtr<Document> document = aTextEditor.GetDocument();
+  RefPtr<dom::Document> document = aTextEditor.GetDocument();
   if (document) {
     // Most of the commands below (possibly all of them) need layout to
     // be up to date.
     document->FlushPendingNotifications(FlushType::Layout);
   }
 
   nsCOMPtr<nsISelectionController> selectionController =
       aTextEditor.GetSelectionController();
--- a/editor/libeditor/EditorCommands.h
+++ b/editor/libeditor/EditorCommands.h
@@ -1,19 +1,21 @@
 /* -*- 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_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"
 #include "nsRefPtrHashtable.h"
 #include "nsStringFwd.h"
 
 class nsAtom;
 class nsCommandParams;
--- a/editor/libeditor/EditorEventListener.cpp
+++ b/editor/libeditor/EditorEventListener.cpp
@@ -7,16 +7,17 @@
 #include "EditorEventListener.h"
 
 #include "mozilla/Assertions.h"  // for MOZ_ASSERT, etc.
 #include "mozilla/AutoRestore.h"
 #include "mozilla/ContentEvents.h"         // for InternalFocusEvent
 #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
 #include "mozilla/TextEditor.h"            // for TextEditor
 #include "mozilla/TextEvents.h"            // for WidgetCompositionEvent
 #include "mozilla/dom/Element.h"           // for Element
 #include "mozilla/dom/Event.h"             // for Event
 #include "mozilla/dom/EventTarget.h"       // for EventTarget
--- a/editor/libeditor/EditorEventListener.h
+++ b/editor/libeditor/EditorEventListener.h
@@ -76,19 +76,19 @@ class EditorEventListener : public nsIDO
   MOZ_CAN_RUN_SCRIPT virtual nsresult MouseClick(
       WidgetMouseEvent* aMouseClickEvent);
   MOZ_CAN_RUN_SCRIPT nsresult Focus(InternalFocusEvent* aFocusEvent);
   nsresult Blur(InternalFocusEvent* aBlurEvent);
   MOZ_CAN_RUN_SCRIPT nsresult DragEnter(dom::DragEvent* aDragEvent);
   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;
   nsIContent* GetFocusedRootContent();
   // Returns true if IME consumes the mouse event.
   bool NotifyIMEOfMouseButtonEvent(WidgetMouseEvent* aMouseEvent);
   bool EditorHasFocus();
   bool IsFileControlTextBox();
--- a/editor/libeditor/HTMLEditUtils.cpp
+++ b/editor/libeditor/HTMLEditUtils.cpp
@@ -221,18 +221,18 @@ bool HTMLEditUtils::IsImage(nsINode* aNo
 
 bool HTMLEditUtils::IsLink(nsINode* aNode) {
   MOZ_ASSERT(aNode);
 
   if (!aNode->IsContent()) {
     return false;
   }
 
-  RefPtr<HTMLAnchorElement> anchor =
-      HTMLAnchorElement::FromNodeOrNull(aNode->AsContent());
+  RefPtr<dom::HTMLAnchorElement> anchor =
+      dom::HTMLAnchorElement::FromNodeOrNull(aNode->AsContent());
   if (!anchor) {
     return false;
   }
 
   nsAutoString tmpText;
   anchor->GetHref(tmpText);
   return !tmpText.IsEmpty();
 }
--- a/editor/libeditor/HTMLEditor.cpp
+++ b/editor/libeditor/HTMLEditor.cpp
@@ -52,16 +52,17 @@
 
 #include "nsIFrame.h"
 #include "mozilla/dom/AncestorIterator.h"
 #include "mozilla/dom/Selection.h"
 #include "mozilla/dom/DocumentFragment.h"
 #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"
 #include "nsContentList.h"
 #include "mozilla/StyleSheet.h"
 #include "mozilla/StyleSheetInlines.h"
 
 namespace mozilla {
--- a/editor/libeditor/HTMLEditorDataTransfer.cpp
+++ b/editor/libeditor/HTMLEditorDataTransfer.cpp
@@ -11,16 +11,18 @@
 #include "HTMLEditUtils.h"
 #include "InternetCiter.h"
 #include "WSRunObject.h"
 #include "mozilla/dom/Comment.h"
 #include "mozilla/dom/DataTransfer.h"
 #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"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Base64.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/EditAction.h"
 #include "mozilla/EditorDOMPoint.h"
--- a/editor/libeditor/HTMLEditorDocumentCommands.cpp
+++ b/editor/libeditor/HTMLEditorDocumentCommands.cpp
@@ -388,17 +388,17 @@ nsresult DocumentStateCommand::GetComman
       NS_WARNING_ASSERTION(NS_SUCCEEDED(rvIgnored),
                            "Failed to set editor status");
       return NS_OK;
     }
     case Command::EditorObserverDocumentLocationChanged: {
       if (!aTextEditor) {
         return NS_OK;
       }
-      Document* document = aTextEditor->GetDocument();
+      dom::Document* document = aTextEditor->GetDocument();
       if (NS_WARN_IF(!document)) {
         return NS_ERROR_FAILURE;
       }
       nsIURI* uri = document->GetDocumentURI();
       if (NS_WARN_IF(!uri)) {
         return NS_ERROR_FAILURE;
       }
       nsresult rv = aParams.SetISupports(STATE_DATA, uri);
--- a/editor/libeditor/HTMLEditorObjectResizer.cpp
+++ b/editor/libeditor/HTMLEditorObjectResizer.cpp
@@ -26,16 +26,17 @@
 #include "nsIContent.h"
 #include "nsID.h"
 #include "mozilla/dom/Document.h"
 #include "nsISupportsUtils.h"
 #include "nsPIDOMWindow.h"
 #include "nsReadableUtils.h"
 #include "nsString.h"
 #include "nsStringFwd.h"
+#include "nsTextNode.h"
 #include "nscore.h"
 #include <algorithm>
 
 #define kTopLeft NS_LITERAL_STRING("nw")
 #define kTop NS_LITERAL_STRING("n")
 #define kTopRight NS_LITERAL_STRING("ne")
 #define kLeft NS_LITERAL_STRING("w")
 #define kRight NS_LITERAL_STRING("e")
--- a/editor/libeditor/HTMLInlineTableEditor.cpp
+++ b/editor/libeditor/HTMLInlineTableEditor.cpp
@@ -1,14 +1,15 @@
 /* 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/. */
 
 #include "mozilla/HTMLEditor.h"
 
+#include "EditorEventListener.h"
 #include "HTMLEditUtils.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/dom/Element.h"
 #include "nsAString.h"
 #include "nsCOMPtr.h"
 #include "nsDebug.h"
 #include "nsError.h"
 #include "nsGenericHTMLElement.h"
--- a/editor/libeditor/InsertNodeTransaction.cpp
+++ b/editor/libeditor/InsertNodeTransaction.cpp
@@ -2,16 +2,18 @@
 /* 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/. */
 
 #include "InsertNodeTransaction.h"
 
 #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
 
 #include "nsAString.h"
 #include "nsDebug.h"          // for NS_WARNING, etc.
 #include "nsError.h"          // for NS_ERROR_NULL_POINTER, etc.
 #include "nsIContent.h"       // for nsIContent
 #include "nsMemory.h"         // for nsMemory
--- a/editor/libeditor/PlaceholderTransaction.h
+++ b/editor/libeditor/PlaceholderTransaction.h
@@ -3,20 +3,23 @@
  * 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 PlaceholderTransaction_h
 #define PlaceholderTransaction_h
 
 #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.
  * But it absorbs other transactions via merge, and can undo/redo the
  * transactions it has absorbed.
  */
 
 class PlaceholderTransaction final
--- a/editor/libeditor/TextEditSubActionHandler.cpp
+++ b/editor/libeditor/TextEditSubActionHandler.cpp
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "TextEditor.h"
 
 #include "mozilla/Assertions.h"
 #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"
 #include "mozilla/TextComposition.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLBRElement.h"
 #include "mozilla/dom/NodeFilterBinding.h"
 #include "mozilla/dom/NodeIterator.h"
--- a/editor/libeditor/TextEditor.cpp
+++ b/editor/libeditor/TextEditor.cpp
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/TextEditor.h"
 
 #include <algorithm>
 
 #include "EditAggregateTransaction.h"
 #include "InternetCiter.h"
+#include "PlaceholderTransaction.h"
 #include "gfxFontUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/ContentIterator.h"
 #include "mozilla/EditAction.h"
 #include "mozilla/EditorDOMPoint.h"
 #include "mozilla/HTMLEditor.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/LookAndFeel.h"
--- a/editor/libeditor/TextEditorDataTransfer.cpp
+++ b/editor/libeditor/TextEditorDataTransfer.cpp
@@ -1,20 +1,22 @@
 /* -*- 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/. */
 
 #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"
 #include "nsAString.h"
 #include "nsCOMPtr.h"
 #include "nsComponentManagerUtils.h"
 #include "nsContentUtils.h"
 #include "nsDebug.h"
--- a/editor/libeditor/WSRunObject.h
+++ b/editor/libeditor/WSRunObject.h
@@ -404,17 +404,17 @@ class MOZ_STACK_CLASS WSRunScanner {
   MOZ_NEVER_INLINE_DEBUG dom::HTMLBRElement* EndReasonBRElementPtr() const {
     MOZ_DIAGNOSTIC_ASSERT(mEndReasonContent->IsHTMLElement(nsGkAtoms::br));
     return static_cast<dom::HTMLBRElement*>(mEndReasonContent.get());
   }
 
   /**
    * Active editing host when this instance is created.
    */
-  Element* GetEditingHost() const { return mEditingHost; }
+  dom::Element* GetEditingHost() const { return mEditingHost; }
 
  protected:
   using EditorType = EditorBase::EditorType;
 
   // WSFragment represents a single run of ws (all leadingws, or all normalws,
   // or all trailingws, or all leading+trailingws).  Note that this single run
   // may still span multiple nodes.
   struct WSFragment final {
@@ -609,17 +609,17 @@ class MOZ_STACK_CLASS WSRunScanner {
 
   // The node passed to our constructor.
   EditorDOMPoint mScanStartPoint;
   EditorDOMPoint mScanEndPoint;
   // Together, the above represent the point at which we are building up ws
   // info.
 
   // The editing host when the instance is created.
-  RefPtr<Element> mEditingHost;
+  RefPtr<dom::Element> mEditingHost;
 
   // true if we are in preformatted whitespace context.
   bool mPRE;
 
   // Node/offset where ws starts and ends.
   nsCOMPtr<nsINode> mStartNode;
   int32_t mStartOffset;
 
@@ -757,17 +757,17 @@ class MOZ_STACK_CLASS WSRunObject final 
    *                        If eNext, selection will be collapsed after the
    *                        <br> element.
    *                        If ePrevious, selection will be collapsed at the
    *                        <br> element.
    * @return                The new <br> node.  If failed to create new <br>
    *                        node, returns nullptr.
    */
   MOZ_CAN_RUN_SCRIPT already_AddRefed<dom::Element> InsertBreak(
-      Selection& aSelection, const EditorDOMPoint& aPointToInsert,
+      dom::Selection& aSelection, const EditorDOMPoint& aPointToInsert,
       nsIEditor::EDirection aSelect);
 
   /**
    * InsertText() inserts aStringToInsert to mScanStartPoint and makes any
    * needed adjustments to white spaces around both mScanStartPoint and
    * mScanEndPoint. E.g., trailing white spaces before mScanStartPoint needs to
    * be removed.  This calls EditorBase::InsertTextWithTransaction() after
    * adjusting white spaces.  So, please refer the method's explanation to know
--- a/editor/spellchecker/TextServicesDocument.cpp
+++ b/editor/spellchecker/TextServicesDocument.cpp
@@ -18,16 +18,17 @@
 #include "nsComposeTxtSrvFilter.h"
 #include "nsDebug.h"                   // for NS_ENSURE_TRUE, etc
 #include "nsDependentSubstring.h"      // for Substring
 #include "nsError.h"                   // for NS_OK, NS_ERROR_FAILURE, etc
 #include "nsGenericHTMLElement.h"      // for nsGenericHTMLElement
 #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
 #include "nsISupportsUtils.h"          // for NS_IF_ADDREF, NS_ADDREF, etc
 #include "mozilla/intl/WordBreaker.h"  // for WordRange, WordBreaker
 #include "nsRange.h"                   // for nsRange
 #include "nsString.h"                  // for nsString, nsAutoString
 #include "nscore.h"                    // for nsresult, NS_IMETHODIMP, etc
--- a/editor/spellchecker/nsComposeTxtSrvFilter.h
+++ b/editor/spellchecker/nsComposeTxtSrvFilter.h
@@ -3,16 +3,18 @@
  * 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 nsComposeTxtSrvFilter_h__
 #define nsComposeTxtSrvFilter_h__
 
 #include "mozilla/UniquePtr.h"
 
+class nsINode;
+
 /**
  * This class enables those using it to skip over certain nodes when
  * traversing content.
  *
  * This filter is used to skip over various form control nodes and
  * mail's cite nodes
  */
 class nsComposeTxtSrvFilter final {
--- a/editor/txmgr/TransactionStack.h
+++ b/editor/txmgr/TransactionStack.h
@@ -1,16 +1,17 @@
 /* -*- 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_TransactionStack_h
 #define mozilla_TransactionStack_h
 
+#include "mozilla/AlreadyAddRefed.h"
 #include "nsDeque.h"
 
 class nsCycleCollectionTraversalCallback;
 
 namespace mozilla {
 
 class TransactionItem;