Bug 417810 - Frequently Visited Pages Disappear From Location Bar Autocomplete. r=dietrich, b-ff3=beltzner

This commit is contained in:
edward.lee@engineering.uiuc.edu 2008-02-20 17:38:38 -08:00
Родитель f4dad20995
Коммит 43dd95c0f5
3 изменённых файлов: 7 добавлений и 4 удалений

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

@ -668,9 +668,9 @@ pref("places.frecency.defaultBucketWeight", 10);
// bonus (in percent) for visit transition types for frecency calculations
pref("places.frecency.embedVisitBonus", 0);
pref("places.frecency.linkVisitBonus", 120);
pref("places.frecency.typedVisitBonus", 200);
pref("places.frecency.bookmarkVisitBonus", 140);
pref("places.frecency.linkVisitBonus", 100);
pref("places.frecency.typedVisitBonus", 500);
pref("places.frecency.bookmarkVisitBonus", 150);
pref("places.frecency.downloadVisitBonus", 0);
pref("places.frecency.permRedirectVisitBonus", 0);
pref("places.frecency.tempRedirectVisitBonus", 0);

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

@ -5906,7 +5906,8 @@ nsNavHistory::UpdateFrecency(PRInt64 aPlaceId, PRBool aIsBookmarked)
// On refresh, when we remove and then add the livemark items,
// the frecency (for a given moz_places) will not have changed
// (if we've never visited that place).
if (newFrecency == oldFrecency)
// Additionally, don't bother overwriting a valid frecency with -1
if (newFrecency == oldFrecency || oldFrecency && newFrecency == -1)
return NS_OK;
mozStorageStatementScoper updateScoper(mDBUpdateFrecencyAndHidden);

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

@ -167,6 +167,8 @@ bucketPrefs.every(function(bucket) {
// sort results by frecency
results.sort(function(a,b) a[1] - b[1]);
results.reverse();
// Make sure there's enough results returned
prefs.setIntPref("browser.urlbar.maxRichResults", results.length);
//results.every(function(el) { dump("result: " + el[1] + ": " + el[0].spec + " (" + el[2] + ")\n"); return true; })