Bug 805885 - Set -moz-image-region on the .social-notification-icon-image class, r=felipe
authorJared Wein <jaws@mozilla.com>
Mon, 29 Oct 2012 23:29:43 -0700
changeset 111879 37412cc39dde62a973ffa46fe6960342eff7b197
parent 111878 96fd3b458899b43a65f6ae0ed2e903b5d6580d75
child 111880 ce2a2b464d88a5064755676584f7bf7af488dd46
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersfelipe
bugs805885
milestone19.0a1
Bug 805885 - Set -moz-image-region on the .social-notification-icon-image class, r=felipe
browser/base/content/browser-social.js
browser/themes/gnomestripe/browser.css
browser/themes/pinstripe/browser.css
browser/themes/winstripe/browser.css
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -839,18 +839,17 @@ var SocialToolbar = {
         iconContainers.appendChild(box);
       }
 
       let labelValue = icon.counter || "";
       // Only update the value attribute if it has changed to reduce layout changes.
       if (!label.hasAttribute("value") || label.getAttribute("value") != labelValue)
         label.setAttribute("value", labelValue);
 
-      if (image.getAttribute("src") != icon.iconURL)
-        image.setAttribute("src", icon.iconURL);
+      image.style.listStyleImage = "url(" + icon.iconURL + ")";
     }
     panel.appendChild(notificationFrames);
     iconBox.appendChild(iconContainers);
 
     for (let frame of createdFrames) {
       if (frame.docShell) {
         frame.docShell.isActive = false;
         frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
--- a/browser/themes/gnomestripe/browser.css
+++ b/browser/themes/gnomestripe/browser.css
@@ -2648,18 +2648,17 @@ html|*#gcli-output-frame {
 }
 
 .social-notification-icon-stack {
   padding: 0;
 }
 
 .social-notification-icon-image {
   margin: 5px 3px;
-  width: 16px;
-  height: 16px;
+  -moz-image-region: rect(0, 16px, 16px, 0);
 }
 
 .social-notification-icon-hbox {
   padding: 0;
 }
 
 .social-notification-icon-label {
   background-color: rgb(240,61,37);
--- a/browser/themes/pinstripe/browser.css
+++ b/browser/themes/pinstripe/browser.css
@@ -4096,18 +4096,17 @@ html|*#gcli-output-frame {
 
 @media (-moz-mac-lion-theme) {
   .social-notification-icon-stack > image:-moz-window-inactive {
     opacity: .5;
   }
 }
 
 .social-notification-icon-image {
-  width: 16px;
-  height: 16px;
+  -moz-image-region: rect(0, 16px, 16px, 0);
 }
 
 /* === end of social toolbar button === */
 
 /* === social toolbar provider menu  === */
 
 #social-statusarea-user-portrait {
   width: 32px;
--- a/browser/themes/winstripe/browser.css
+++ b/browser/themes/winstripe/browser.css
@@ -3310,17 +3310,17 @@ html|*#gcli-output-frame {
 }
 
 #social-toolbar-item > .toolbarbutton-1 {
   padding: 5px;
   -moz-appearance: toolbarbutton;
 }
 
 @navbarLargeIcons@ > #social-toolbar-item > .toolbarbutton-1 {
-  padding: 5px 0;
+  padding: 6px 0;
 }
 
 @navbarLargeIcons@ > #social-toolbar-item > .toolbarbutton-1:first-child {
   -moz-padding-start: 5px;
 }
 
 @navbarLargeIcons@ > #social-toolbar-item > .toolbarbutton-1:last-child {
   -moz-padding-end: 5px;
@@ -3344,18 +3344,17 @@ html|*#gcli-output-frame {
   box-shadow: 0 1px 0 rgba(0,39,121,0.77);
 }
 
 .social-notification-icon-label[value=""] {
   display: none;
 }
 
 .social-notification-icon-image {
-  width: 16px;
-  height: 16px;
+  -moz-image-region: rect(0, 16px, 16px, 0);
 }
 
 /* social toolbar provider menu */
 #social-statusarea-popup {
   margin-top: 0;
   margin-left: -12px;
   margin-right: -12px;
 }