From c82994226020e20a693d222ccb46c0bb3b359dd4 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Fri, 6 Apr 2007 08:29:41 +0000 Subject: [PATCH] Bug 376633 - Sort By Title should not group by item type. r=dietrich. git-svn-id: svn://10.0.0.236/trunk@224258 18797224-902f-48f8-a5cc-f745e15eee43 --- .../places/src/nsNavHistoryResult.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/mozilla/toolkit/components/places/src/nsNavHistoryResult.cpp b/mozilla/toolkit/components/places/src/nsNavHistoryResult.cpp index 8380d97a11e..802bab50817 100644 --- a/mozilla/toolkit/components/places/src/nsNavHistoryResult.cpp +++ b/mozilla/toolkit/components/places/src/nsNavHistoryResult.cpp @@ -694,13 +694,8 @@ PRInt32 PR_CALLBACK nsNavHistoryContainerResultNode::SortComparison_Bookmark( PRInt32 PR_CALLBACK nsNavHistoryContainerResultNode::SortComparison_TitleLess( nsNavHistoryResultNode* a, nsNavHistoryResultNode* b, void* closure) { - PRUint32 aType, bType; + PRUint32 aType; a->GetType(&aType); - b->GetType(&bType); - - if (aType != bType) { - return bType - aType; - } if (aType == nsINavHistoryResultNode::RESULT_TYPE_DAY) { // for the history sidebar, when we do "View | By Date" or @@ -780,17 +775,8 @@ PRInt32 PR_CALLBACK nsNavHistoryContainerResultNode::SortComparison_DateGreater( PRInt32 PR_CALLBACK nsNavHistoryContainerResultNode::SortComparison_URILess( nsNavHistoryResultNode* a, nsNavHistoryResultNode* b, void* closure) { - PRUint32 aType, bType; - a->GetType(&aType); - b->GetType(&bType); - - if (aType != bType) { - // comparing different types - return bType - aType; - } - PRInt32 value; - if (a->IsURI()) { + if (a->IsURI() && b->IsURI()) { // normal URI or visit value = a->mURI.Compare(b->mURI.get()); } else {