Bug 1275432 - showing container icons in file and tab menu. draft
authorJonathan Kingston <jkingston@mozilla.com>
Thu, 26 May 2016 12:12:24 +0100
changeset 373644 778b22752c26cef7c09cc5a80f6b5fe510ce829b
parent 373211 864cdd00360cdf62ea5132a457ee53a17f9e31aa
child 522438 5dc43b29d0fa662cdce8b276792a367053d30a75
push id19802
push userjkingston@mozilla.com
push dateWed, 01 Jun 2016 00:30:00 +0000
bugs1275432
milestone49.0a1
Bug 1275432 - showing container icons in file and tab menu. MozReview-Commit-ID: 9QJHU188MwI
browser/base/content/utilityOverlay.js
browser/themes/linux/browser.css
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -417,22 +417,23 @@ function createUserContextMenu(event, ad
   let bundle = document.getElementById("bundle_browser");
   let docfrag = document.createDocumentFragment();
 
   ContextualIdentityService.getIdentities().forEach(identity => {
     let menuitem = document.createElement("menuitem");
     menuitem.setAttribute("usercontextid", identity.userContextId);
     menuitem.setAttribute("label", bundle.getString(identity.label));
     menuitem.setAttribute("accesskey", bundle.getString(identity.accessKey));
+    menuitem.classList.add("menuitem-iconic");
 
     if (addCommandAttribute) {
       menuitem.setAttribute("command", "Browser:NewUserContextTab");
     }
 
-    menuitem.style.listStyleImage = "url(" + identity.icon + ")";
+    menuitem.setAttribute("image", identity.icon);
 
     docfrag.appendChild(menuitem);
   });
 
   event.target.appendChild(docfrag);
   return true;
 }
 
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -1982,8 +1982,12 @@ notification.pluginVulnerable > .notific
   padding-inline-end: 0 !important;
   margin-inline-end: 0 !important;
 }
 
 .browser-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 0;
   overflow: hidden;
 }
+
+.menuitem-iconic[command="Browser:NewUserContextTab"] > .menu-iconic-left > .menu-iconic-icon {
+  visibility: visible;
+}