Bug 1627175 - part 27: Get rid of `EditorBase::GetNextNode()` and `EditorBase::GetPreviousNode()` r=m_kato

Depends on D113230

Differential Revision: https://phabricator.services.mozilla.com/D113231
This commit is contained in:
Masayuki Nakano 2021-04-27 11:17:39 +00:00
Родитель 82aa5b8992
Коммит 7a2d02c10f
2 изменённых файлов: 1 добавлений и 14 удалений

Просмотреть файл

@ -1726,9 +1726,6 @@ class EditorBase : public nsIEditor,
/**
* Get the previous node.
*/
nsIContent* GetPreviousNode(const EditorRawDOMPoint& aPoint) const {
return GetPreviousContent(aPoint, {});
}
nsIContent* GetPreviousElementOrText(const EditorRawDOMPoint& aPoint) const {
return GetPreviousContent(aPoint,
{WalkTreeOption::IgnoreDataNodeExceptText});
@ -1749,9 +1746,6 @@ class EditorBase : public nsIEditor,
return GetPreviousContent(aPoint, {WalkTreeOption::IgnoreNonEditableNode,
WalkTreeOption::StopAtBlockBoundary});
}
nsIContent* GetPreviousNode(const nsINode& aNode) const {
return GetPreviousContent(aNode, {});
}
nsIContent* GetPreviousElementOrText(const nsINode& aNode) const {
return GetPreviousContent(aNode,
{WalkTreeOption::IgnoreDataNodeExceptText});
@ -1798,10 +1792,6 @@ class EditorBase : public nsIEditor,
* node.
*/
template <typename PT, typename CT>
nsIContent* GetNextNode(const EditorDOMPointBase<PT, CT>& aPoint) const {
return GetNextContent(aPoint, {});
}
template <typename PT, typename CT>
nsIContent* GetNextElementOrText(
const EditorDOMPointBase<PT, CT>& aPoint) const {
return GetNextContent(aPoint, {WalkTreeOption::IgnoreDataNodeExceptText});
@ -1828,9 +1818,6 @@ class EditorBase : public nsIEditor,
return GetNextContent(aPoint, {WalkTreeOption::IgnoreNonEditableNode,
WalkTreeOption::StopAtBlockBoundary});
}
nsIContent* GetNextNode(const nsINode& aNode) const {
return GetNextContent(aNode, {});
}
nsIContent* GetNextElementOrText(const nsINode& aNode) const {
return GetNextContent(aNode, {WalkTreeOption::IgnoreDataNodeExceptText});
}

Просмотреть файл

@ -5162,7 +5162,7 @@ Result<EditorDOMPoint, nsresult> HTMLEditor::AutoDeleteRangesHandler::
EditorRawDOMPoint::After(mEmptyInclusiveAncestorBlockElement));
MOZ_ASSERT(afterEmptyBlock.IsSet());
if (nsIContent* nextContentOfEmptyBlock =
aHTMLEditor.GetNextNode(afterEmptyBlock)) {
aHTMLEditor.GetNextContent(afterEmptyBlock, {})) {
EditorDOMPoint pt = aHTMLEditor.GetGoodCaretPointFor(
*nextContentOfEmptyBlock, aDirectionAndAmount);
if (!pt.IsSet()) {