/* -*- 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 "WSRunScanner.h" #include "EditorDOMPoint.h" #include "EditorUtils.h" #include "HTMLEditUtils.h" #include "mozilla/Assertions.h" #include "mozilla/dom/AncestorIterator.h" #include "mozilla/dom/CharacterDataBuffer.h" #include "nsCRT.h" #include "nsDebug.h" #include "nsIContent.h" #include "nsIContentInlines.h" namespace mozilla { using namespace dom; using AncestorType = HTMLEditUtils::AncestorType; using AncestorTypes = HTMLEditUtils::AncestorTypes; using LeafNodeOption = HTMLEditUtils::LeafNodeOption; using LeafNodeOptions = HTMLEditUtils::LeafNodeOptions; template WSRunScanner::TextFragmentData::TextFragmentData(Options, const EditorDOMPoint&, const Element*); template WSRunScanner::TextFragmentData::TextFragmentData( Options, const EditorRawDOMPoint&, const Element*); template WSRunScanner::TextFragmentData::TextFragmentData( Options, const EditorDOMPointInText&, const Element*); template WSRunScanner::TextFragmentData::TextFragmentData( Options, const EditorRawDOMPointInText&, const Element*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetInclusiveNextCharPoint, const EditorDOMPoint&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetInclusiveNextCharPoint, const EditorRawDOMPoint&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetInclusiveNextCharPoint, const EditorDOMPointInText&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetInclusiveNextCharPoint, const EditorRawDOMPointInText&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetPreviousCharPoint, const EditorDOMPoint&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetPreviousCharPoint, const EditorRawDOMPoint&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetPreviousCharPoint, const EditorDOMPointInText&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetPreviousCharPoint, const EditorRawDOMPointInText&, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetEndOfCollapsibleASCIIWhiteSpaces, const EditorDOMPointInText&, nsIEditor::EDirection, Options, IgnoreNonEditableNodes, const nsIContent*); NS_INSTANTIATE_METHOD_RETURNING_ANY_EDITOR_DOM_POINT( WSRunScanner::TextFragmentData::GetFirstASCIIWhiteSpacePointCollapsedTo, const EditorDOMPointInText&, nsIEditor::EDirection, Options, IgnoreNonEditableNodes, const nsIContent*); // FIXME: I think the scanner should not cross the