Bug 1633014 - Fix non-unified build errors in editor/. r=m_kato

Differential Revision: https://phabricator.services.mozilla.com/D72470
This commit is contained in:
Botond Ballo 2020-04-27 03:36:57 +00:00
parent 0440ea1f97
commit ffdcf19a50
21 changed files with 35 additions and 10 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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> 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.

View File

@ -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"

View File

@ -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

View File

@ -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;

View File

@ -226,8 +226,8 @@ bool HTMLEditUtils::IsLink(nsINode* aNode) {
return false;
}
RefPtr<HTMLAnchorElement> anchor =
HTMLAnchorElement::FromNodeOrNull(aNode->AsContent());
RefPtr<dom::HTMLAnchorElement> anchor =
dom::HTMLAnchorElement::FromNodeOrNull(aNode->AsContent());
if (!anchor) {
return false;
}

View File

@ -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"

View File

@ -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"

View File

@ -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;
}

View File

@ -31,6 +31,7 @@
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsStringFwd.h"
#include "nsTextNode.h"
#include "nscore.h"
#include <algorithm>

View File

@ -4,6 +4,7 @@
#include "mozilla/HTMLEditor.h"
#include "EditorEventListener.h"
#include "HTMLEditUtils.h"
#include "mozilla/PresShell.h"
#include "mozilla/dom/Element.h"

View File

@ -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

View File

@ -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.

View File

@ -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"

View File

@ -9,6 +9,7 @@
#include "EditAggregateTransaction.h"
#include "InternetCiter.h"
#include "PlaceholderTransaction.h"
#include "gfxFontUtils.h"
#include "mozilla/Assertions.h"
#include "mozilla/ContentIterator.h"

View File

@ -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"

View File

@ -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<Element> mEditingHost;
RefPtr<dom::Element> 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<dom::Element> InsertBreak(
Selection& aSelection, const EditorDOMPoint& aPointToInsert,
dom::Selection& aSelection, const EditorDOMPoint& aPointToInsert,
nsIEditor::EDirection aSelect);
/**

View File

@ -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

View File

@ -8,6 +8,8 @@
#include "mozilla/UniquePtr.h"
class nsINode;
/**
* This class enables those using it to skip over certain nodes when
* traversing content.

View File

@ -6,6 +6,7 @@
#ifndef mozilla_TransactionStack_h
#define mozilla_TransactionStack_h
#include "mozilla/AlreadyAddRefed.h"
#include "nsDeque.h"
class nsCycleCollectionTraversalCallback;