Fixed bug caused during XPCOM'ing the nsIContent API

git-svn-id: svn://10.0.0.236/trunk@9555 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com 1998-09-08 22:32:32 +00:00
parent 5e56e0d9f0
commit e8824a34c4
2 changed files with 12 additions and 6 deletions

View File

@ -1545,9 +1545,12 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const
if (index+1 < count) {
parent->ChildAt(index+1, result);
// Get first child down the tree
PRInt32 n;
result->ChildCount(n);
while (n > 0) {
for (;;) {
PRInt32 n;
result->ChildCount(n);
if (n <= 0) {
break;
}
nsIContent * old = result;
old->ChildAt(0, result);
NS_RELEASE(old);

View File

@ -1545,9 +1545,12 @@ nsIContent* nsDocument::GetNextContent(const nsIContent *aContent) const
if (index+1 < count) {
parent->ChildAt(index+1, result);
// Get first child down the tree
PRInt32 n;
result->ChildCount(n);
while (n > 0) {
for (;;) {
PRInt32 n;
result->ChildCount(n);
if (n <= 0) {
break;
}
nsIContent * old = result;
old->ChildAt(0, result);
NS_RELEASE(old);