mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-08 16:03:21 +00:00
Bug 78940. Fix nsOutlinerRows::First() logic so that we get a good iterator when the rows are empty. r=varga@utcru.sk, sr=hyatt
This commit is contained in:
parent
794a2200b0
commit
01dd4dd512
@ -95,10 +95,12 @@ nsOutlinerRows::Last()
|
||||
|
||||
// Build up a path along the rightmost edge of the tree
|
||||
Subtree* current = &mRoot;
|
||||
while (current && current->Count()) {
|
||||
result.Push(current, current->Count() - 1);
|
||||
current = GetSubtreeFor(current, current->Count() - 1);
|
||||
}
|
||||
do {
|
||||
PRInt32 count = current->Count();
|
||||
PRInt32 last = count - 1;
|
||||
result.Push(current, last);
|
||||
current = count ? GetSubtreeFor(current, last) : nsnull;
|
||||
} while (current);
|
||||
|
||||
// Now, at the bottom rightmost leaf, advance us one off the end.
|
||||
result.mLink[result.mTop].mChildIndex++;
|
||||
|
@ -95,10 +95,12 @@ nsOutlinerRows::Last()
|
||||
|
||||
// Build up a path along the rightmost edge of the tree
|
||||
Subtree* current = &mRoot;
|
||||
while (current && current->Count()) {
|
||||
result.Push(current, current->Count() - 1);
|
||||
current = GetSubtreeFor(current, current->Count() - 1);
|
||||
}
|
||||
do {
|
||||
PRInt32 count = current->Count();
|
||||
PRInt32 last = count - 1;
|
||||
result.Push(current, last);
|
||||
current = count ? GetSubtreeFor(current, last) : nsnull;
|
||||
} while (current);
|
||||
|
||||
// Now, at the bottom rightmost leaf, advance us one off the end.
|
||||
result.mLink[result.mTop].mChildIndex++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user