Bug 1640276 - Part 4: Mark nsINode as const in GetNext/Previous*Node() r=masayuki
authorKagami Sascha Rosylight <saschanaz@outlook.com>
Sat, 23 May 2020 12:39:16 +0000
changeset 531779 65c499f35baaa7201c05c1de2ac509884920218d
parent 531778 77aab1a07cfc6a3cd566bde4a3d1020a10a57d42
child 531780 d918b4d3936cc8b41d7106172b44b70501a8a168
push id37443
push usercbrindusan@mozilla.com
push dateSat, 23 May 2020 21:42:57 +0000
treeherdermozilla-central@9a2f741cef6a [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 4: Mark nsINode as const in GetNext/Previous*Node() r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D76565
editor/libeditor/EditorBase.h
--- a/editor/libeditor/EditorBase.h
+++ b/editor/libeditor/EditorBase.h
@@ -1598,32 +1598,32 @@ class EditorBase : public nsIEditor,
   nsIContent* GetPreviousElementOrTextInBlock(
       const EditorRawDOMPoint& aPoint) const {
     return GetPreviousNodeInternal(aPoint, false, false, true);
   }
   nsIContent* GetPreviousEditableNodeInBlock(
       const EditorRawDOMPoint& aPoint) const {
     return GetPreviousNodeInternal(aPoint, true, true, true);
   }
-  nsIContent* GetPreviousNode(nsINode& aNode) const {
+  nsIContent* GetPreviousNode(const nsINode& aNode) const {
     return GetPreviousNodeInternal(aNode, false, true, false);
   }
-  nsIContent* GetPreviousElementOrText(nsINode& aNode) const {
+  nsIContent* GetPreviousElementOrText(const nsINode& aNode) const {
     return GetPreviousNodeInternal(aNode, false, false, false);
   }
-  nsIContent* GetPreviousEditableNode(nsINode& aNode) const {
+  nsIContent* GetPreviousEditableNode(const nsINode& aNode) const {
     return GetPreviousNodeInternal(aNode, true, true, false);
   }
-  nsIContent* GetPreviousNodeInBlock(nsINode& aNode) const {
+  nsIContent* GetPreviousNodeInBlock(const nsINode& aNode) const {
     return GetPreviousNodeInternal(aNode, false, true, true);
   }
-  nsIContent* GetPreviousElementOrTextInBlock(nsINode& aNode) const {
+  nsIContent* GetPreviousElementOrTextInBlock(const nsINode& aNode) const {
     return GetPreviousNodeInternal(aNode, false, false, true);
   }
-  nsIContent* GetPreviousEditableNodeInBlock(nsINode& aNode) const {
+  nsIContent* GetPreviousEditableNodeInBlock(const nsINode& aNode) const {
     return GetPreviousNodeInternal(aNode, true, true, true);
   }
 
   /**
    * Get the next node.
    *
    * Note that methods taking EditorRawDOMPoint behavior includes the
    * child at offset as search target.  E.g., following code causes infinite
@@ -1672,32 +1672,32 @@ class EditorBase : public nsIEditor,
       const EditorDOMPointBase<PT, CT>& aPoint) const {
     return GetNextNodeInternal(aPoint, false, false, true);
   }
   template <typename PT, typename CT>
   nsIContent* GetNextEditableNodeInBlock(
       const EditorDOMPointBase<PT, CT>& aPoint) const {
     return GetNextNodeInternal(aPoint, true, true, true);
   }
-  nsIContent* GetNextNode(nsINode& aNode) const {
+  nsIContent* GetNextNode(const nsINode& aNode) const {
     return GetNextNodeInternal(aNode, false, true, false);
   }
-  nsIContent* GetNextElementOrText(nsINode& aNode) const {
+  nsIContent* GetNextElementOrText(const nsINode& aNode) const {
     return GetNextNodeInternal(aNode, false, false, false);
   }
-  nsIContent* GetNextEditableNode(nsINode& aNode) const {
+  nsIContent* GetNextEditableNode(const nsINode& aNode) const {
     return GetNextNodeInternal(aNode, true, true, false);
   }
-  nsIContent* GetNextNodeInBlock(nsINode& aNode) const {
+  nsIContent* GetNextNodeInBlock(const nsINode& aNode) const {
     return GetNextNodeInternal(aNode, false, true, true);
   }
-  nsIContent* GetNextElementOrTextInBlock(nsINode& aNode) const {
+  nsIContent* GetNextElementOrTextInBlock(const nsINode& aNode) const {
     return GetNextNodeInternal(aNode, false, false, true);
   }
-  nsIContent* GetNextEditableNodeInBlock(nsINode& aNode) const {
+  nsIContent* GetNextEditableNodeInBlock(const nsINode& aNode) const {
     return GetNextNodeInternal(aNode, true, true, true);
   }
 
   /**
    * Returns true if aNode is our root node.
    */
   bool IsRoot(const nsINode* inNode) const;
   bool IsEditorRoot(const nsINode* aNode) const;