Fix bug 255236 (composer confused by broken nextSibling on textnodes). Patch

by Peter Van der Beken <peterv@propagandism.org>, r+sr=bzbarsky, a=shaver
This commit is contained in:
bzbarsky%mit.edu 2004-08-12 19:46:54 +00:00
Родитель bd387a9faf
Коммит e9215e4304
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);
}
}