From 82f6e5499ed968b1bc3d4af339ce3f6cb0afb88f Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Thu, 7 Feb 2008 09:30:08 +0000 Subject: [PATCH] Bug 389478 - "Add favicons on back/forward menus" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) ui-r=beltzner r=gavin a1.9=schrep] git-svn-id: svn://10.0.0.236/trunk@245119 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index b94b6dbafdb..7661616f325 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -2948,6 +2948,16 @@ function FillHistoryMenu(aParent) { item.setAttribute("label", entry.title || entry.URI.spec); item.setAttribute("index", j); + + if (j != index) { + try { + let iconURL = Cc["@mozilla.org/browser/favicon-service;1"] + .getService(Ci.nsIFaviconService) + .getFaviconForPage(entry.URI).spec; + item.setAttribute("image", iconURL); + } catch (ex) {} + } + if (j < index) { item.className = "unified-nav-back"; item.setAttribute("tooltiptext", tooltipBack);