diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp
index 35c1cd8edac2..05140cc25f3f 100644
--- a/editor/libeditor/HTMLEditor.cpp
+++ b/editor/libeditor/HTMLEditor.cpp
@@ -4965,7 +4965,7 @@ nsIContent* HTMLEditor::GetNextHTMLSibling(nsINode* aNode,
}
nsIContent* HTMLEditor::GetPreviousHTMLElementOrTextInternal(
- nsINode& aNode, bool aNoBlockCrossing) const {
+ const nsINode& aNode, bool aNoBlockCrossing) const {
if (NS_WARN_IF(!GetActiveEditingHost())) {
return nullptr;
}
@@ -5003,7 +5003,7 @@ nsIContent* HTMLEditor::GetPreviousEditableHTMLNodeInternal(
}
nsIContent* HTMLEditor::GetNextHTMLElementOrTextInternal(
- nsINode& aNode, bool aNoBlockCrossing) const {
+ const nsINode& aNode, bool aNoBlockCrossing) const {
if (NS_WARN_IF(!GetActiveEditingHost())) {
return nullptr;
}
diff --git a/editor/libeditor/HTMLEditor.h b/editor/libeditor/HTMLEditor.h
index 4134ac489a77..1e03edfb5514 100644
--- a/editor/libeditor/HTMLEditor.h
+++ b/editor/libeditor/HTMLEditor.h
@@ -1029,7 +1029,7 @@ class HTMLEditor final : public TextEditor,
* GetPreviousHTMLElementOrTextInternal() methods are common implementation
* of above methods. Please don't use this method directly.
*/
- nsIContent* GetPreviousHTMLElementOrTextInternal(nsINode& aNode,
+ nsIContent* GetPreviousHTMLElementOrTextInternal(const nsINode& aNode,
bool aNoBlockCrossing) const;
template
nsIContent* GetPreviousHTMLElementOrTextInternal(
@@ -1098,7 +1098,7 @@ class HTMLEditor final : public TextEditor,
* GetNextHTMLNodeInternal() methods are common implementation
* of above methods. Please don't use this method directly.
*/
- nsIContent* GetNextHTMLElementOrTextInternal(nsINode& aNode,
+ nsIContent* GetNextHTMLElementOrTextInternal(const nsINode& aNode,
bool aNoBlockCrossing) const;
template
nsIContent* GetNextHTMLElementOrTextInternal(