From 866889e82525bee82ab73e4f57e6c2f2bb2cdf88 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 23 May 2020 12:39:03 +0000 Subject: [PATCH] Bug 1640276 - Part 3: Mark nsINode as const in GetNext/PreviousNodeInternal() r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D76564 --- editor/libeditor/EditorBase.cpp | 4 ++-- editor/libeditor/EditorBase.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index 267e4e31b439..e8ae039e00bf 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -2793,7 +2793,7 @@ nsresult EditorBase::DeleteTextWithTransaction(Text& aTextNode, return rv; } -nsIContent* EditorBase::GetPreviousNodeInternal(nsINode& aNode, +nsIContent* EditorBase::GetPreviousNodeInternal(const nsINode& aNode, bool aFindEditableNode, bool aFindAnyDataNode, bool aNoBlockCrossing) const { @@ -2852,7 +2852,7 @@ nsIContent* EditorBase::GetPreviousNodeInternal(const EditorRawDOMPoint& aPoint, aFindAnyDataNode, aNoBlockCrossing); } -nsIContent* EditorBase::GetNextNodeInternal(nsINode& aNode, +nsIContent* EditorBase::GetNextNodeInternal(const nsINode& aNode, bool aFindEditableNode, bool aFindAnyDataNode, bool aNoBlockCrossing) const { diff --git a/editor/libeditor/EditorBase.h b/editor/libeditor/EditorBase.h index 7a0697a89d38..b02059e07465 100644 --- a/editor/libeditor/EditorBase.h +++ b/editor/libeditor/EditorBase.h @@ -2045,7 +2045,8 @@ class EditorBase : public nsIEditor, * aFindEditableNode is true. If there is no * previous node, returns nullptr. */ - nsIContent* GetPreviousNodeInternal(nsINode& aNode, bool aFindEditableNode, + nsIContent* GetPreviousNodeInternal(const nsINode& aNode, + bool aFindEditableNode, bool aFindAnyDataNode, bool aNoBlockCrossing) const; @@ -2070,9 +2071,9 @@ class EditorBase : public nsIEditor, * aFindEditableNode is true. If there is no * next node, returns nullptr. */ - nsIContent* GetNextNodeInternal(nsINode& aNode, bool aFindEditableNode, + nsIContent* GetNextNodeInternal(const nsINode& aNode, bool aFindEditableNode, bool aFindAnyDataNode, - bool bNoBlockCrossing) const; + bool aNoBlockCrossing) const; /** * And another version that takes a point in DOM tree rather than a node.