diff --git a/browser/base/content/browser-social.js b/browser/base/content/browser-social.js index 693af842583..3999b75b52e 100644 --- a/browser/base/content/browser-social.js +++ b/browser/base/content/browser-social.js @@ -584,7 +584,11 @@ let SocialShareButton = { if (profile && profile.displayName) { profileRow.hidden = false; let portrait = document.getElementById("socialUserPortrait"); - portrait.setAttribute("src", profile.portrait || "chrome://global/skin/icons/information-32.png"); + if (profile.portrait) { + portrait.setAttribute("src", profile.portrait); + } else { + portrait.removeAttribute("src"); + } let displayName = document.getElementById("socialUserDisplayName"); displayName.setAttribute("label", profile.displayName); } else { @@ -802,7 +806,7 @@ var SocialToolbar = { if (!Social.provider) return; let profile = Social.provider.profile || {}; - let userPortrait = profile.portrait || "chrome://global/skin/icons/information-32.png"; + let userPortrait = profile.portrait; let userDetailsBroadcaster = document.getElementById("socialBroadcaster_userDetails"); let loggedInStatusValue = profile.userName || @@ -810,8 +814,13 @@ var SocialToolbar = { // "image" and "label" are used by Mac's native menus that do not render the menuitem's children // elements. "src" and "value" are used by the image/label children on the other platforms. - userDetailsBroadcaster.setAttribute("src", userPortrait); - userDetailsBroadcaster.setAttribute("image", userPortrait); + if (userPortrait) { + userDetailsBroadcaster.setAttribute("src", userPortrait); + userDetailsBroadcaster.setAttribute("image", userPortrait); + } else { + userDetailsBroadcaster.removeAttribute("src"); + userDetailsBroadcaster.removeAttribute("image"); + } userDetailsBroadcaster.setAttribute("value", loggedInStatusValue); userDetailsBroadcaster.setAttribute("label", loggedInStatusValue); diff --git a/browser/base/content/test/social/browser_social_toolbar.js b/browser/base/content/test/social/browser_social_toolbar.js index 50ca9bc50bb..2e710c4cc1d 100644 --- a/browser/base/content/test/social/browser_social_toolbar.js +++ b/browser/base/content/test/social/browser_social_toolbar.js @@ -23,7 +23,7 @@ var tests = { // check dom values let portrait = document.getElementsByClassName("social-statusarea-user-portrait")[0].getAttribute("src"); // this is the default image for the profile area when not logged in. - is(portrait, "chrome://global/skin/icons/information-32.png", "portrait is empty"); + ok(!portrait, "portrait is empty"); let userDetailsBroadcaster = document.getElementById("socialBroadcaster_userDetails"); let notLoggedInStatusValue = userDetailsBroadcaster.getAttribute("notLoggedInLabel"); let userButton = document.getElementsByClassName("social-statusarea-loggedInStatus")[0]; diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index a497518b5dc..0a92f8a63de 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -1436,6 +1436,7 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- #socialUserPortrait { width: 48px; height: 48px; + list-style-image:url("chrome://global/skin/icons/information-32.png"); } #socialUserDisplayName, @@ -2142,6 +2143,10 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon { margin-right: -12px; } +.social-statusarea-user { + list-style-image:url("chrome://global/skin/icons/information-32.png"); +} + .social-statusarea-user-portrait { width: 32px; height: 32px; diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css index bc71cd3ee7c..7ef0b48c2ff 100644 --- a/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css @@ -1673,6 +1673,7 @@ window[tabsontop="false"] richlistitem[type~="action"][actiontype="switchtab"][s #socialUserPortrait { width: 48px; height: 48px; + list-style-image:url("chrome://global/skin/icons/information-32.png"); } #socialUserDisplayName, @@ -3616,6 +3617,10 @@ toolbar[mode="icons"] > *|* > .social-notification-container > .toolbarbutton-1[ /* === social toolbar provider menu === */ +.social-statusarea-user { + list-style-image:url("chrome://global/skin/icons/information-32.png"); +} + .social-statusarea-user-portrait { width: 32px; height: 32px; diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index f755c624d2f..4385c984cc0 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -1614,6 +1614,7 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- #socialUserPortrait { width: 48px; height: 48px; + list-style-image:url("chrome://global/skin/icons/information-32.png"); } #socialUserDisplayName, @@ -2727,6 +2728,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { background-color: -moz-Dialog; position: relative; cursor: pointer; + list-style-image:url("chrome://global/skin/icons/information-32.png"); } .social-statusarea-user-portrait {