Bug 941648 - SocialAPI status buttons shouldn't be visible in toolbarless browser windows, r=mixedpuppy, a=bajaj.
authorFlorian Quèze <florian@queze.net>
Mon, 25 Nov 2013 12:12:58 +0100
changeset 167537 64b99c299be99f63f077b06ac1451e1faa54421a
parent 167536 d129e2349785eb17aeb45f2630e3d1b11ad1a260
child 167538 0a2d470b157422a1d306c287c04c369cd625abe2
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, bajaj
bugs941648
milestone27.0a2
Bug 941648 - SocialAPI status buttons shouldn't be visible in toolbarless browser windows, r=mixedpuppy, a=bajaj.
browser/base/content/browser-social.js
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -1021,17 +1021,17 @@ SocialToolbar = {
         SharedFrame.updateURL(notificationFrameId, icon.contentPanel);
       }
 
       let toolbarButtonId = "social-notification-icon-" + icon.name;
       let toolbarButton = document.getElementById(toolbarButtonId);
       if (!toolbarButton) {
         toolbarButton = document.createElement("toolbarbutton");
         toolbarButton.setAttribute("type", "badged");
-        toolbarButton.classList.add("toolbarbutton-1");
+        toolbarButton.setAttribute("class", "toolbarbutton-1 chromeclass-toolbar-additional");
         toolbarButton.setAttribute("id", toolbarButtonId);
         toolbarButton.setAttribute("notificationFrameId", notificationFrameId);
         toolbarButton.addEventListener("mousedown", function (event) {
           if (event.button == 0 && panel.state == "closed")
             SocialToolbar.showAmbientPopup(toolbarButton);
         });
 
         toolbarButtons.appendChild(toolbarButton);
@@ -1472,17 +1472,17 @@ SocialStatus = {
     return this._dynamicResizer;
   },
 
   _createButton: function(provider) {
     if (!provider.statusURL)
       return null;
     let palette = document.getElementById("navigator-toolbox").palette;
     let button = document.createElement("toolbarbutton");
-    button.setAttribute("class", "toolbarbutton-1 social-status-button");
+    button.setAttribute("class", "toolbarbutton-1 chromeclass-toolbar-additional social-status-button");
     button.setAttribute("type", "badged");
     button.setAttribute("removable", "true");
     button.setAttribute("image", provider.iconURL);
     button.setAttribute("label", provider.name);
     button.setAttribute("tooltiptext", provider.name);
     button.setAttribute("origin", provider.origin);
     button.setAttribute("oncommand", "SocialStatus.showPopup(this);");
     button.setAttribute("id", this._toolbarHelper.idFromOrgin(provider.origin));
@@ -1755,17 +1755,17 @@ SocialMarks = {
   },
 
   _createButton: function(provider) {
     if (!provider.markURL)
       return null;
     let palette = document.getElementById("navigator-toolbox").palette;
     let button = document.createElement("toolbarbutton");
     button.setAttribute("type", "socialmark");
-    button.setAttribute("class", "toolbarbutton-1 social-mark-button");
+    button.setAttribute("class", "toolbarbutton-1 chromeclass-toolbar-additional social-mark-button");
     button.style.listStyleImage = "url(" + provider.iconURL + ")";
     button.setAttribute("origin", provider.origin);
     button.setAttribute("id", this._toolbarHelper.idFromOrgin(provider.origin));
     palette.appendChild(button);
     return button
   },
 
   markLink: function(aOrigin, aUrl) {