From 08c8f548fdbf758e4fdfd8885ec598bcf3691946 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 12 Aug 2004 19:46:54 +0000 Subject: [PATCH] Fix bug 255236 (composer confused by broken nextSibling on textnodes). Patch by Peter Van der Beken , r+sr=bzbarsky, a=shaver --- content/base/src/nsGenericDOMDataNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/base/src/nsGenericDOMDataNode.cpp b/content/base/src/nsGenericDOMDataNode.cpp index c1c246c3586..2b8b2a34fe6 100644 --- a/content/base/src/nsGenericDOMDataNode.cpp +++ b/content/base/src/nsGenericDOMDataNode.cpp @@ -165,13 +165,13 @@ nsGenericDOMDataNode::GetNextSibling(nsIDOMNode** aNextSibling) nsIContent *parent = GetParent(); if (parent) { PRInt32 pos = parent->IndexOf(this); - if (pos > 0) { + if (pos > -1) { sibling = parent->GetChildAt(pos + 1); } } else if (mDocument) { PRInt32 pos = mDocument->IndexOf(this); - if (pos > 0) { + if (pos > -1) { sibling = mDocument->GetChildAt(pos + 1); } }