Bug 1640276 - Part 6: Mark nsINode as const in GetNext/PreviousHTMLElementOrText*() r=masayuki
authorKagami Sascha Rosylight <saschanaz@outlook.com>
Sat, 23 May 2020 12:39:48 +0000
changeset 531798 54cdb503a9152341ebdb1f375e2e6ada99054ab8
parent 531797 d918b4d3936cc8b41d7106172b44b70501a8a168
child 531799 3dcbb4d3d97263affdbbca60b15c0e78a98f3807
push id116879
push userkrosylight@mozilla.com
push dateSat, 23 May 2020 14:48:36 +0000
treeherderautoland@3dcbb4d3d972 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1640276
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1640276 - Part 6: Mark nsINode as const in GetNext/PreviousHTMLElementOrText*() r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D76569
editor/libeditor/HTMLEditor.h
--- a/editor/libeditor/HTMLEditor.h
+++ b/editor/libeditor/HTMLEditor.h
@@ -1003,20 +1003,20 @@ class HTMLEditor final : public TextEdit
            aNode->AsText()->TextIsOnlyWhitespace();
   }
 
   /**
    * GetPreviousHTMLElementOrText*() methods are similar to
    * EditorBase::GetPreviousElementOrText*() but this won't return nodes
    * outside active editing host.
    */
-  nsIContent* GetPreviousHTMLElementOrText(nsINode& aNode) const {
+  nsIContent* GetPreviousHTMLElementOrText(const nsINode& aNode) const {
     return GetPreviousHTMLElementOrTextInternal(aNode, false);
   }
-  nsIContent* GetPreviousHTMLElementOrTextInBlock(nsINode& aNode) const {
+  nsIContent* GetPreviousHTMLElementOrTextInBlock(const nsINode& aNode) const {
     return GetPreviousHTMLElementOrTextInternal(aNode, true);
   }
   template <typename PT, typename CT>
   nsIContent* GetPreviousHTMLElementOrText(
       const EditorDOMPointBase<PT, CT>& aPoint) const {
     return GetPreviousHTMLElementOrTextInternal(aPoint, false);
   }
   template <typename PT, typename CT>
@@ -1072,20 +1072,20 @@ class HTMLEditor final : public TextEdit
    * EditorBase::GetNextElementOrText*() but this won't return nodes outside
    * active editing host.
    *
    * Note that same as EditorBase::GetTextEditableNode(), methods which take
    * |const EditorRawDOMPoint&| start to search from the node pointed by it.
    * On the other hand, methods which take |nsINode&| start to search from
    * next node of aNode.
    */
-  nsIContent* GetNextHTMLElementOrText(nsINode& aNode) const {
+  nsIContent* GetNextHTMLElementOrText(const nsINode& aNode) const {
     return GetNextHTMLElementOrTextInternal(aNode, false);
   }
-  nsIContent* GetNextHTMLElementOrTextInBlock(nsINode& aNode) const {
+  nsIContent* GetNextHTMLElementOrTextInBlock(const nsINode& aNode) const {
     return GetNextHTMLElementOrTextInternal(aNode, true);
   }
   template <typename PT, typename CT>
   nsIContent* GetNextHTMLElementOrText(
       const EditorDOMPointBase<PT, CT>& aPoint) const {
     return GetNextHTMLElementOrTextInternal(aPoint, false);
   }
   template <typename PT, typename CT>