diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index dd3f0ff0cde..7592a9b3a79 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -203,6 +203,11 @@ pref("browser.urlbar.doubleClickSelectsAll", false); pref("browser.urlbar.autoFill", false); pref("browser.urlbar.matchOnlyTyped", false); +// if false, will use one-line-per-result for urlbar autocomplete +pref("browser.urlbar.richResults", true); +// the maximum number of results to show in autocomplete when doing richResults +pref("browser.urlbar.maxRichResults", 25); + pref("browser.download.useDownloadDir", true); pref("browser.download.folderList", 0); pref("browser.download.manager.showAlertOnComplete", true); diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index d34bcce9122..08934dbbeb4 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -11,6 +11,10 @@ searchbar { -moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-result-popup"); } +#PopupAutoCompleteRichResult { + -moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup"); +} + /* ::::: print preview toolbar ::::: */ toolbar[printpreview="true"] { -moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar"); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index f0102075e1f..e429819970b 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -890,6 +890,14 @@ function delayedStartup() gURLBar.setAttribute("enablehistory", "false"); } + if (gURLBar) { + try { + if (gPrefService.getBoolPref("browser.urlbar.richResults")) + gURLBar.setAttribute("autocompletepopup", "PopupAutoCompleteRichResult"); + } catch (ex) { + } + } + gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true); window.addEventListener("keypress", ctrlNumberTabSelection, false); diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 4309602e00a..c38d6265ff8 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -99,8 +99,12 @@ onclick="checkForMiddleClick(this, event);"/> +