mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 797298 make logged out information icon themeable, r=markh
This commit is contained in:
parent
d32a3f8254
commit
c81ceaa106
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user