Bug 1386576 - Use list-style-image rather than the image attribute for items in the back/forward menu so that CSS can override this to display back/forward icons. r=mak
MozReview-Commit-ID: LvnpJlGlOqk
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4092,18 +4092,20 @@ function FillHistoryMenu(aParent) {
item.setAttribute("uri", uri);
item.setAttribute("label", entry.title || uri);
item.setAttribute("index", j);
// Cache this so that gotoHistoryIndex doesn't need the original index
item.setAttribute("historyindex", j - index);
if (j != index) {
- item.setAttribute("image",
- PlacesUtils.urlWithSizeRef(window, "page-icon:" + uri, 16));
+ // Use list-style-image rather than the image attribute in order to
+ // allow CSS to override this.
+ item.style.listStyleImage =
+ "url(" + PlacesUtils.urlWithSizeRef(window, "page-icon:" + uri, 16) + ")";
}
if (j < index) {
item.className = "unified-nav-back menuitem-iconic menuitem-with-favicon";
item.setAttribute("tooltiptext", tooltipBack);
} else if (j == index) {
item.setAttribute("type", "radio");
item.setAttribute("checked", "true");