зеркало из https://github.com/mozilla/pjs.git
Bug 325348, r=annie.sullivan Bookmarks in results not updated when there is no tree attached.
Original committer: brettw%gmail.com Original revision: 1.46 Original date: 2006/01/31 22:25:24
This commit is contained in:
Родитель
9bac551746
Коммит
aaabc48ee7
|
@ -2595,7 +2595,7 @@ nsNavHistoryFolderResultNode::StartIncrementalUpdate()
|
|||
if (! mOptions->ExcludeItems() && ! mOptions->ExcludeQueries()) {
|
||||
|
||||
// easy case: we are visible, always do incremental update
|
||||
if (AreChildrenVisible())
|
||||
if (mExpanded || AreChildrenVisible())
|
||||
return PR_TRUE;
|
||||
|
||||
nsNavHistoryResult* result = GetResult();
|
||||
|
@ -2640,8 +2640,16 @@ nsNavHistoryFolderResultNode::OnItemAdded(nsIURI* aBookmark, PRInt64 aFolder,
|
|||
NS_ASSERTION(aFolder == mFolderId, "Got wrong bookmark update");
|
||||
if (mOptions->ExcludeItems())
|
||||
return NS_OK; // don't update items when we aren't displaying them
|
||||
if (aIndex < 0 || aIndex > mChildren.Count())
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
// here, try to do something reasonable if the bookmark service gives us
|
||||
// a bogus index.
|
||||
if (aIndex < 0) {
|
||||
NS_NOTREACHED("Invalid index for item adding: <0");
|
||||
aIndex = 0;
|
||||
} else if (aIndex > mChildren.Count()) {
|
||||
NS_NOTREACHED("Invalid index for item adding: greater than count");
|
||||
aIndex = mChildren.Count();
|
||||
}
|
||||
if (! StartIncrementalUpdate())
|
||||
return NS_OK;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче