diff --git a/editor/base/nsEditor.cpp b/editor/base/nsEditor.cpp index 99ceb3983c1d..d7ff9957b6cb 100644 --- a/editor/base/nsEditor.cpp +++ b/editor/base/nsEditor.cpp @@ -2533,7 +2533,7 @@ nsEditor::GetPriorNode(nsIDOMNode *aParentNode, // and want the deep-right child. else { - result = GetRightmostChild(*aResultNode, aResultNode); + result = GetRightmostChild(aParentNode, aResultNode); if (NS_FAILED(result)) return result; if (!aEditableNode) return result; if (IsEditable(*aResultNode)) return result; @@ -2564,7 +2564,7 @@ nsEditor::GetNextNode(nsIDOMNode *aParentNode, nsCOMPtr child = GetChildAt(aParentNode, aOffset); if (child) { - result = GetLeftmostChild(*aResultNode, aResultNode); + result = GetLeftmostChild(aParentNode, aResultNode); if (NS_FAILED(result)) return result; if (!aEditableNode) return result; if (IsEditable(*aResultNode)) return result; diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index 99ceb3983c1d..d7ff9957b6cb 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -2533,7 +2533,7 @@ nsEditor::GetPriorNode(nsIDOMNode *aParentNode, // and want the deep-right child. else { - result = GetRightmostChild(*aResultNode, aResultNode); + result = GetRightmostChild(aParentNode, aResultNode); if (NS_FAILED(result)) return result; if (!aEditableNode) return result; if (IsEditable(*aResultNode)) return result; @@ -2564,7 +2564,7 @@ nsEditor::GetNextNode(nsIDOMNode *aParentNode, nsCOMPtr child = GetChildAt(aParentNode, aOffset); if (child) { - result = GetLeftmostChild(*aResultNode, aResultNode); + result = GetLeftmostChild(aParentNode, aResultNode); if (NS_FAILED(result)) return result; if (!aEditableNode) return result; if (IsEditable(*aResultNode)) return result;