Bug 1405419 - Part 2: Remove a dead overload of HTMLEditor::GetPriorHTMLSibling(); r=masayuki
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 03 Oct 2017 16:20:30 -0400
changeset 384524 f8bc133f9a07759010bdbc60e92499de396f11dd
parent 384523 b38062303696ee1af70b51e45910620c4e9c7aad
child 384525 8012e6b0d4814abe6816a274fc6eedabaccd6d2f
push id32629
push userkwierso@gmail.com
push dateWed, 04 Oct 2017 23:38:17 +0000
treeherdermozilla-central@dedd9a48da69 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1405419
milestone58.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 1405419 - Part 2: Remove a dead overload of HTMLEditor::GetPriorHTMLSibling(); r=masayuki
editor/libeditor/HTMLEditor.cpp
editor/libeditor/HTMLEditor.h
--- a/editor/libeditor/HTMLEditor.cpp
+++ b/editor/libeditor/HTMLEditor.cpp
@@ -3818,34 +3818,16 @@ HTMLEditor::GetPriorHTMLSibling(nsIDOMNo
 
   nsCOMPtr<nsINode> node = do_QueryInterface(inNode);
   NS_ENSURE_TRUE(node, NS_ERROR_NULL_POINTER);
 
   *outNode = do_QueryInterface(GetPriorHTMLSibling(node));
   return NS_OK;
 }
 
-nsresult
-HTMLEditor::GetPriorHTMLSibling(nsIDOMNode* inParent,
-                                int32_t inOffset,
-                                nsCOMPtr<nsIDOMNode>* outNode)
-{
-  NS_ENSURE_TRUE(outNode, NS_ERROR_NULL_POINTER);
-  *outNode = nullptr;
-
-  nsCOMPtr<nsINode> parent = do_QueryInterface(inParent);
-  NS_ENSURE_TRUE(parent, NS_ERROR_NULL_POINTER);
-
-  nsCOMPtr<nsINode> child = parent->GetChildAt(inOffset);
-  NS_ENSURE_TRUE(child, NS_ERROR_NULL_POINTER);
-
-  *outNode = do_QueryInterface(GetPriorHTMLSibling(child));
-  return NS_OK;
-}
-
 /**
  * GetNextHTMLSibling() returns the next editable sibling, if there is
  * one within the parent.
  */
 nsIContent*
 HTMLEditor::GetNextHTMLSibling(nsINode* aNode)
 {
   MOZ_ASSERT(aNode);
--- a/editor/libeditor/HTMLEditor.h
+++ b/editor/libeditor/HTMLEditor.h
@@ -765,18 +765,16 @@ protected:
   bool IsAtEndOfNode(nsINode& aNode, int32_t aOffset);
   bool IsOnlyAttribute(const nsIContent* aElement, const nsAString& aAttribute);
 
   nsresult RemoveBlockContainer(nsIContent& aNode);
 
   nsIContent* GetPriorHTMLSibling(nsINode* aNode);
   nsresult GetPriorHTMLSibling(nsIDOMNode*inNode,
                                nsCOMPtr<nsIDOMNode>* outNode);
-  nsresult GetPriorHTMLSibling(nsIDOMNode* inParent, int32_t inOffset,
-                               nsCOMPtr<nsIDOMNode>* outNode);
 
   nsIContent* GetNextHTMLSibling(nsINode* aNode);
   nsresult GetNextHTMLSibling(nsIDOMNode* inNode,
                               nsCOMPtr<nsIDOMNode>* outNode);
   nsIContent* GetNextHTMLSibling(nsINode* aParent, int32_t aOffset);
   nsresult GetNextHTMLSibling(nsIDOMNode* inParent, int32_t inOffset,
                               nsCOMPtr<nsIDOMNode>* outNode);